From patchwork Fri May 24 11:28:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arturo Borrero X-Patchwork-Id: 246132 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 135DB2C016A for ; Fri, 24 May 2013 21:28:49 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751885Ab3EXL2q (ORCPT ); Fri, 24 May 2013 07:28:46 -0400 Received: from smtp3.cica.es ([150.214.5.190]:58200 "EHLO smtp.cica.es" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751596Ab3EXL2q (ORCPT ); Fri, 24 May 2013 07:28:46 -0400 Received: from localhost (unknown [127.0.0.1]) by smtp.cica.es (Postfix) with ESMTP id D891651ED16; Fri, 24 May 2013 11:28:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at cica.es Received: from smtp.cica.es ([127.0.0.1]) by localhost (mail.cica.es [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AIj2R7CTRvP7; Fri, 24 May 2013 13:28:43 +0200 (CEST) Received: from nfdev.cica.es (nfdev.cica.es [IPv6:2a00:9ac0:c1ca:31::220]) by smtp.cica.es (Postfix) with ESMTP id A15AB51ED17; Fri, 24 May 2013 13:28:43 +0200 (CEST) Subject: [libnftables PATCH 1/2] src: chain: delete useless castings To: netfilter-devel@vger.kernel.org From: Arturo Borrero Cc: pablo@netfilter.org Date: Fri, 24 May 2013 13:28:41 +0200 Message-ID: <20130524112841.13209.37017.stgit@nfdev.cica.es> In-Reply-To: <20130524112756.13209.37625.stgit@nfdev.cica.es> References: <20130524112756.13209.37625.stgit@nfdev.cica.es> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org These casting were useless. Signed-off-by: Arturo Borrero Gonzalez --- src/chain.c | 6 +++--- src/expr/counter.c | 4 ++-- src/rule.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/src/chain.c b/src/chain.c index b160cff..4146e6a 100644 --- a/src/chain.c +++ b/src/chain.c @@ -490,7 +490,7 @@ static int nft_chain_xml_parse(struct nft_chain *c, char *xml) return -1; } - c->handle = (uint64_t)utmp; + c->handle = utmp; c->flags |= (1 << NFT_CHAIN_ATTR_HANDLE); /* Get and set */ @@ -503,7 +503,7 @@ static int nft_chain_xml_parse(struct nft_chain *c, char *xml) mxmlDelete(tree); return -1; } - c->bytes = (uint64_t)utmp; + c->bytes = utmp; c->flags |= (1 << NFT_CHAIN_ATTR_BYTES); /* Get and set */ @@ -516,7 +516,7 @@ static int nft_chain_xml_parse(struct nft_chain *c, char *xml) mxmlDelete(tree); return -1; } - c->packets = (uint64_t)utmp; + c->packets = utmp; c->flags |= (1 << NFT_CHAIN_ATTR_PACKETS); /* Ignore node */ diff --git a/src/expr/counter.c b/src/expr/counter.c index 633db3e..129f32e 100644 --- a/src/expr/counter.c +++ b/src/expr/counter.c @@ -160,7 +160,7 @@ nft_rule_expr_counter_xml_parse(struct nft_rule_expr *e, char *xml) return -1; } - ctr->pkts = (uint64_t)tmp; + ctr->pkts = tmp; e->flags |= (1 << NFT_EXPR_CTR_PACKETS); } @@ -174,7 +174,7 @@ nft_rule_expr_counter_xml_parse(struct nft_rule_expr *e, char *xml) return -1; } - ctr->bytes = (uint64_t)tmp; + ctr->bytes = tmp; e->flags |= (1 << NFT_EXPR_CTR_BYTES); } diff --git a/src/rule.c b/src/rule.c index f000a77..318ae07 100644 --- a/src/rule.c +++ b/src/rule.c @@ -503,7 +503,7 @@ static int nft_rule_xml_parse(struct nft_rule *r, char *xml) return -1; } - r->handle = (uint64_t)tmp; + r->handle = tmp; r->flags |= (1 << NFT_RULE_ATTR_HANDLE); /* get and set */