From 9d575d763958c30a044cc3d8d839b3c39bb67bd2 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net" Date: Wed, 5 Sep 2007 14:10:53 +0000 Subject: Fix strict aliasing warnings --- iptables-xml.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'iptables-xml.c') diff --git a/iptables-xml.c b/iptables-xml.c index 1bb2e20..2aefb1a 100644 --- a/iptables-xml.c +++ b/iptables-xml.c @@ -70,12 +70,16 @@ print_usage(const char *name, const char *version) static int parse_counters(char *string, struct ipt_counters *ctr) { - if (string != NULL) + u_int64_t *pcnt, *bcnt; + + if (string != NULL) { + pcnt = &ctr->pcnt; + bcnt = &ctr->bcnt; return (sscanf (string, "[%llu:%llu]", - (unsigned long long *) &ctr->pcnt, - (unsigned long long *) &ctr->bcnt) == 2); - else + (unsigned long long *)pcnt, + (unsigned long long *)bcnt) == 2); + } else return (0 == 2); } -- cgit v1.2.3