From patchwork Wed Oct 2 23:08:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Leblond X-Patchwork-Id: 280187 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 5C84C2C0099 for ; Thu, 3 Oct 2013 09:08:45 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753151Ab3JBXIn (ORCPT ); Wed, 2 Oct 2013 19:08:43 -0400 Received: from ks28632.kimsufi.com ([91.121.96.152]:50359 "EHLO ks28632.kimsufi.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753345Ab3JBXIj (ORCPT ); Wed, 2 Oct 2013 19:08:39 -0400 Received: from bayen.regit.org ([81.57.69.189] helo=localhost.localdomain) by ks28632.kimsufi.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1VRVX3-0000bL-V5; Thu, 03 Oct 2013 01:08:38 +0200 From: Eric Leblond To: netfilter-devel@vger.kernel.org Cc: eric@regit.org, pablo@netfilter.org Subject: [nftables PATCH 2/4] netlink: suppress useless variable Date: Thu, 3 Oct 2013 01:08:06 +0200 Message-Id: <1380755288-17587-3-git-send-email-eric@regit.org> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1380755288-17587-1-git-send-email-eric@regit.org> References: <1380755288-17587-1-git-send-email-eric@regit.org> X-Spam-Score: -2.9 (--) Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Signed-off-by: Eric Leblond --- src/netlink.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/netlink.c b/src/netlink.c index b1e44ad..6f3002b 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -441,7 +441,6 @@ static int netlink_flush_rules(struct netlink_ctx *ctx, const struct handle *h, const struct location *loc) { struct nft_rule_list *rule_cache; - struct nft_rule *nlr; rule_cache = mnl_nft_rule_dump(nf_sock, h->family); if (rule_cache == NULL) @@ -450,9 +449,7 @@ static int netlink_flush_rules(struct netlink_ctx *ctx, const struct handle *h, strerror(errno)); mnl_batch_begin(); - nlr = alloc_nft_rule(h); nft_rule_list_foreach(rule_cache, flush_rule_cb, ctx); - nft_rule_free(nlr); nft_rule_list_free(rule_cache); mnl_batch_end(); return 0;