summaryrefslogtreecommitdiffstats
path: root/iptables-xml.c
diff options
context:
space:
mode:
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);
}