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:
parent
26873308b2
commit
522e89d60b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue