You need to sign in or sign up before continuing.
提交 522e89d6 编写于 作者: S simran singhal 提交者: Pablo Neira Ayuso

netfilter: ipset: Compress return logic

Simplify function returns by merging assignment and return into one
command line.
Signed-off-by: Nsimran singhal <singhalsimran0@gmail.com>
Signed-off-by: NJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
上级 26873308
...@@ -453,7 +453,6 @@ static size_t ...@@ -453,7 +453,6 @@ static size_t
list_set_memsize(const struct list_set *map, size_t dsize) list_set_memsize(const struct list_set *map, size_t dsize)
{ {
struct set_elem *e; struct set_elem *e;
size_t memsize;
u32 n = 0; u32 n = 0;
rcu_read_lock(); rcu_read_lock();
...@@ -461,9 +460,7 @@ list_set_memsize(const struct list_set *map, size_t dsize) ...@@ -461,9 +460,7 @@ list_set_memsize(const struct list_set *map, size_t dsize)
n++; n++;
rcu_read_unlock(); rcu_read_unlock();
memsize = sizeof(*map) + n * dsize; return (sizeof(*map) + n * dsize);
return memsize;
} }
static int static int
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册