From patchwork Fri Jul 19 15:17:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Bursztyka X-Patchwork-Id: 260294 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 5FDB02C008C for ; Sat, 20 Jul 2013 01:18:19 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760144Ab3GSPSQ (ORCPT ); Fri, 19 Jul 2013 11:18:16 -0400 Received: from mga14.intel.com ([143.182.124.37]:21979 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760172Ab3GSPSQ (ORCPT ); Fri, 19 Jul 2013 11:18:16 -0400 Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga102.ch.intel.com with ESMTP; 19 Jul 2013 08:18:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.89,702,1367996400"; d="scan'208";a="270608999" Received: from unknown (HELO rd-180.ger.corp.intel.com) ([10.252.122.114]) by AZSMGA002.ch.intel.com with ESMTP; 19 Jul 2013 08:18:14 -0700 From: Tomasz Bursztyka To: netfilter-devel@vger.kernel.org Cc: Tomasz Bursztyka Subject: [iptables-nftables - RFC PATCH 13/15] nft: Remove useless function Date: Fri, 19 Jul 2013 18:17:42 +0300 Message-Id: <1374247064-3361-14-git-send-email-tomasz.bursztyka@linux.intel.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1374247064-3361-1-git-send-email-tomasz.bursztyka@linux.intel.com> References: <1374247064-3361-1-git-send-email-tomasz.bursztyka@linux.intel.com> Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Signed-off-by: Tomasz Bursztyka --- iptables/nft.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/iptables/nft.c b/iptables/nft.c index 4476fcd..009c3b3 100644 --- a/iptables/nft.c +++ b/iptables/nft.c @@ -1677,33 +1677,6 @@ next: return 0; } -static inline int -match_different(const struct xt_entry_match *a, - const unsigned char *a_elems, - const unsigned char *b_elems, - unsigned char **maskptr) -{ - const struct xt_entry_match *b; - unsigned int i; - - /* Offset of b is the same as a. */ - b = (void *)b_elems + ((unsigned char *)a - a_elems); - - if (a->u.match_size != b->u.match_size) - return 1; - - if (strcmp(a->u.user.name, b->u.user.name) != 0) - return 1; - - *maskptr += XT_ALIGN(sizeof(*a)); - - for (i = 0; i < a->u.match_size - XT_ALIGN(sizeof(*a)); i++) - if (((a->data[i] ^ b->data[i]) & (*maskptr)[i]) != 0) - return 1; - *maskptr += i; - return 0; -} - static int nft_parse_counters(struct nft_trans_rule_context *rule_ctx, struct nft_trans_instruction_context *first, struct nft_trans_instruction_context *useless,