提交 ac0f1d98 编写于 作者: P Pablo Neira Ayuso 提交者: David S. Miller

[NETFILTER]: nfnetlink: remove unrequired check in nfnetlink_get_subsys

subsys_table is initialized to NULL, therefore just returns NULL in case
that it is not set.
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: NPatrick McHardy <kaber@trash.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d9e6d029
...@@ -94,8 +94,7 @@ static inline struct nfnetlink_subsystem *nfnetlink_get_subsys(u_int16_t type) ...@@ -94,8 +94,7 @@ static inline struct nfnetlink_subsystem *nfnetlink_get_subsys(u_int16_t type)
{ {
u_int8_t subsys_id = NFNL_SUBSYS_ID(type); u_int8_t subsys_id = NFNL_SUBSYS_ID(type);
if (subsys_id >= NFNL_SUBSYS_COUNT if (subsys_id >= NFNL_SUBSYS_COUNT)
|| subsys_table[subsys_id] == NULL)
return NULL; return NULL;
return subsys_table[subsys_id]; return subsys_table[subsys_id];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册