Skip to content

Commit 522e89d

Browse files
simransinghalummakynes
authored andcommitted
netfilter: ipset: Compress return logic
Simplify function returns by merging assignment and return into one command line. Signed-off-by: simran singhal <[email protected]> Signed-off-by: Jozsef Kadlecsik <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 2687330 commit 522e89d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

net/netfilter/ipset/ip_set_list_set.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,17 +453,14 @@ static size_t
453453
list_set_memsize(const struct list_set *map, size_t dsize)
454454
{
455455
struct set_elem *e;
456-
size_t memsize;
457456
u32 n = 0;
458457

459458
rcu_read_lock();
460459
list_for_each_entry_rcu(e, &map->members, list)
461460
n++;
462461
rcu_read_unlock();
463462

464-
memsize = sizeof(*map) + n * dsize;
465-
466-
return memsize;
463+
return (sizeof(*map) + n * dsize);
467464
}
468465

469466
static int

0 commit comments

Comments
 (0)