netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arturo Borrero <arturo.borrero.glez@gmail.com>
To: netfilter-devel@vger.kernel.org
Cc: pablo@netfilter.org
Subject: [libnftables PATCH 1/2] src: chain: delete useless castings
Date: Fri, 24 May 2013 13:28:41 +0200	[thread overview]
Message-ID: <20130524112841.13209.37017.stgit@nfdev.cica.es> (raw)
In-Reply-To: <20130524112756.13209.37625.stgit@nfdev.cica.es>

These casting were useless.


Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
---
 src/chain.c        |    6 +++---
 src/expr/counter.c |    4 ++--
 src/rule.c         |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

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 <chain bytes="x" ... >*/
@@ -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 <chain packets="x" ... > */
@@ -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 <properties> 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 <rule_flags> */


  reply	other threads:[~2013-05-24 11:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-24 11:28 [libnftables PATCH 0/2] small fixes for libnftables XML Arturo Borrero
2013-05-24 11:28 ` Arturo Borrero [this message]
2013-05-27 12:47   ` [libnftables PATCH 1/2] src: chain: delete useless castings Pablo Neira Ayuso
2013-05-24 11:28 ` [libnftables PATCH 2/2] src: xml: add versioning Arturo Borrero
2013-05-27 12:51   ` Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130524112841.13209.37017.stgit@nfdev.cica.es \
    --to=arturo.borrero.glez@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).