From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: [PATCH 4/6] remove unrequired checking in nfnetlink_get_subsys Date: Thu, 15 Feb 2007 04:23:19 +0100 Message-ID: <45D3D227.20205@netfilter.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090900010909010303020802" Cc: Patrick McHardy To: Netfilter Development Mailinglist Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org This is a multi-part message in MIME format. --------------090900010909010303020802 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit subsys_table is initialized to NULL, therefore just returns NULL in case that it is not set. Signed-off-by: Pablo Neira Ayuso -- 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 --------------090900010909010303020802 Content-Type: text/plain; name="07.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="07.patch" [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 Index: net-2.6.git/net/netfilter/nfnetlink.c =================================================================== --- net-2.6.git.orig/net/netfilter/nfnetlink.c 2006-12-26 04:34:18.000000000 +0100 +++ net-2.6.git/net/netfilter/nfnetlink.c 2006-12-26 04:37:59.000000000 +0100 @@ -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]; --------------090900010909010303020802--