summaryrefslogtreecommitdiff
path: root/net/netfilter
diff options
context:
space:
mode:
authorsimran singhal <singhalsimran0@gmail.com>2017-09-11 21:52:37 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2017-10-04 16:19:06 +0200
commit522e89d60b62d16075a7bc96dd5eb2f3eb813635 (patch)
treeba8f68c21bdf6953870735901507138cec81d0dd /net/netfilter
parent26873308b21654b6e0785b9f9e2c5414d37a4c4c (diff)
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')
-rw-r--r--net/netfilter/ipset/ip_set_list_set.c5
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