Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1605584 > unrolled thread
| Started by | simran singhal <singhalsimran0@gmail.com> |
|---|---|
| First post | 2017-03-21 14:30 +0100 |
| Last post | 2017-03-21 17:00 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/2] netfilter: ipvs: Compress return logic simran singhal <singhalsimran0@gmail.com> - 2017-03-21 14:30 +0100
Re: [PATCH 2/2] netfilter: ipvs: Compress return logic Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2017-03-21 17:00 +0100
| From | simran singhal <singhalsimran0@gmail.com> |
|---|---|
| Date | 2017-03-21 14:30 +0100 |
| Subject | [PATCH 2/2] netfilter: ipvs: Compress return logic |
| Message-ID | <tns1j-3SO-1@gated-at.bofh.it> |
Simplify function returns by merging assignment and return into
one command line.
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
--This is my contribution to the netfilter project of
Outreachy Round 14.
net/netfilter/ipvs/ip_vs_ftp.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c
index d30c327..c93c937 100644
--- a/net/netfilter/ipvs/ip_vs_ftp.c
+++ b/net/netfilter/ipvs/ip_vs_ftp.c
@@ -482,11 +482,8 @@ static struct pernet_operations ip_vs_ftp_ops = {
static int __init ip_vs_ftp_init(void)
{
- int rv;
-
- rv = register_pernet_subsys(&ip_vs_ftp_ops);
/* rcu_barrier() is called by netns on error */
- return rv;
+ return register_pernet_subsys(&ip_vs_ftp_ops);
}
/*
--
2.7.4
[toc] | [next] | [standalone]
| From | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
|---|---|
| Date | 2017-03-21 17:00 +0100 |
| Message-ID | <tnumu-5mU-15@gated-at.bofh.it> |
| In reply to | #1605584 |
Hello!
On 03/21/2017 04:23 PM, simran singhal wrote:
> Simplify function returns by merging assignment and return into
> one command line.
You mean "one statement"?
> Signed-off-by: simran singhal <singhalsimran0@gmail.com>
> ---
>
> --This is my contribution to the netfilter project of
> Outreachy Round 14.
>
> net/netfilter/ipvs/ip_vs_ftp.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/net/netfilter/ipvs/ip_vs_ftp.c b/net/netfilter/ipvs/ip_vs_ftp.c
> index d30c327..c93c937 100644
> --- a/net/netfilter/ipvs/ip_vs_ftp.c
> +++ b/net/netfilter/ipvs/ip_vs_ftp.c
> @@ -482,11 +482,8 @@ static struct pernet_operations ip_vs_ftp_ops = {
>
> static int __init ip_vs_ftp_init(void)
> {
> - int rv;
> -
> - rv = register_pernet_subsys(&ip_vs_ftp_ops);
> /* rcu_barrier() is called by netns on error */
> - return rv;
> + return register_pernet_subsys(&ip_vs_ftp_ops);
> }
>
> /*
MBR, Sergei
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web