From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: [PATCH 05/10] netfilter: xt_osf: simplify xt_osf_match_packet() Date: Sat, 20 Oct 2018 11:43:12 +0200 Message-ID: <20181020094317.16011-6-pablo@netfilter.org> References: <20181020094317.16011-1-pablo@netfilter.org> Cc: davem@davemloft.net, netdev@vger.kernel.org To: netfilter-devel@vger.kernel.org Return-path: Received: from mail.us.es ([193.147.175.20]:55498 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727405AbeJTRxV (ORCPT ); Sat, 20 Oct 2018 13:53:21 -0400 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id DD7235B84A for ; Sat, 20 Oct 2018 11:43:29 +0200 (CEST) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id CE09CDA863 for ; Sat, 20 Oct 2018 11:43:29 +0200 (CEST) In-Reply-To: <20181020094317.16011-1-pablo@netfilter.org> Sender: netdev-owner@vger.kernel.org List-ID: info area in match is always available, and remove unneeded variables. Signed-off-by: Pablo Neira Ayuso --- net/netfilter/xt_osf.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/net/netfilter/xt_osf.c b/net/netfilter/xt_osf.c index bf7bba80e24c..7a103553d10d 100644 --- a/net/netfilter/xt_osf.c +++ b/net/netfilter/xt_osf.c @@ -40,14 +40,8 @@ static bool xt_osf_match_packet(const struct sk_buff *skb, struct xt_action_param *p) { - const struct xt_osf_info *info = p->matchinfo; - struct net *net = xt_net(p); - - if (!info) - return false; - return nf_osf_match(skb, xt_family(p), xt_hooknum(p), xt_in(p), - xt_out(p), info, net, nf_osf_fingers); + xt_out(p), p->matchinfo, xt_net(p), nf_osf_fingers); } static struct xt_match xt_osf_match = { -- 2.11.0