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>
This commit is contained in:
simran singhal 2017-09-11 21:52:37 +02:00 committed by Pablo Neira Ayuso
parent 26873308b2
commit 522e89d60b
1 changed files with 1 additions and 4 deletions

View File

@ -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