remove unrequired checking in nfnetlink_get_subsys
Subsystems (2)
Pablo Neira Ayuso
maintainerPATCH 4/6 remove unrequired checking in nfnetlink_get_subsys
subsys_table is initialized to NULL, therefore just returns NULL in case that it is not set.
Signed-off-by Pablo Neira Ayuso <[email protected]>
Signature · 2 lines
The dawn of the fourth age of Linux firewalling is coming; a time of great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris
[PATCH] remove unrequired checking in nfnetlink_get_subsys
subsys_table is initialized to NULL, therefore just returns NULL in case that it is not set.
Signed-off-by Pablo Neira Ayuso <[email protected]>
net/netfilter/nfnetlink.c +1 -2
@@ -72,8 +72,7 @@ static inline struct nfnetlink_subsystem {u_int8_t subsys_id =NFNL_SUBSYS_ID (type); -if (subsys_id >=NFNL_SUBSYS_COUNT - || subsys_table[subsys_id] ==NULL ) +if (subsys_id >=NFNL_SUBSYS_COUNT )return NULL ;return subsys_table[subsys_id];