Skip to contentSkip to conversation

remove unrequired checking in nfnetlink_get_subsys

PATCH In review Pablo Neira Ayuso 1 participant 1 message Feb 12, 2007

Subsystems (2)
lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 5/7 remove unrequired checking in nfnetlink_get_subsys

subsys_table is initialized to NULL, therefore just returns NULL in case that it is not set.

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.

net/netfilter/nfnetlink.c +1 -2
Index: net-2.6.git/net/netfilter/nfnetlink.c
===================================================================
@@ -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];