summaryrefslogtreecommitdiffstats
path: root/iptables-xml.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-09-05 14:10:53 +0000
committerPatrick McHardy <kaber@trash.net>2007-09-05 14:10:53 +0000
commitb73691f9e67149deefbc2d2115d66dfc62264333 (patch)
tree91d7aad991612c21f4add4e1e54a2c16cf914b54 /iptables-xml.c
parent31317ed1f9103434adda716abbe65e9fc7bdd418 (diff)
Fix strict aliasing warnings
Diffstat (limited to 'iptables-xml.c')
-rw-r--r--iptables-xml.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/iptables-xml.c b/iptables-xml.c
index 1bb2e203..2aefb1aa 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);
}