mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
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
1 changed files with 1 additions and 4 deletions
|
@ -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 a new issue