diff options
author | simran singhal <singhalsimran0@gmail.com> | 2017-09-11 22:52:37 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-10-04 17:19:06 +0300 |
commit | 522e89d60b62d16075a7bc96dd5eb2f3eb813635 (patch) | |
tree | ba8f68c21bdf6953870735901507138cec81d0dd /net/netfilter/ipset/ip_set_list_set.c | |
parent | 26873308b21654b6e0785b9f9e2c5414d37a4c4c (diff) | |
download | linux-522e89d60b62d16075a7bc96dd5eb2f3eb813635.tar.xz |
netfilter: ipset: Compress return logic
Simplify function returns by merging assignment and return into one
command line.
Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/ipset/ip_set_list_set.c')
-rw-r--r-- | net/netfilter/ipset/ip_set_list_set.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/netfilter/ipset/ip_set_list_set.c b/net/netfilter/ipset/ip_set_list_set.c index 178d4eba013b..2fff6b5dc6f0 100644 --- a/net/netfilter/ipset/ip_set_list_set.c +++ b/net/netfilter/ipset/ip_set_list_set.c @@ -453,7 +453,6 @@ static size_t list_set_memsize(const struct list_set *map, size_t dsize) { struct set_elem *e; - size_t memsize; u32 n = 0; rcu_read_lock(); @@ -461,9 +460,7 @@ list_set_memsize(const struct list_set *map, size_t dsize) n++; rcu_read_unlock(); - memsize = sizeof(*map) + n * dsize; - - return memsize; + return (sizeof(*map) + n * dsize); } static int |