From ab0b15ee5b334f45da4b53ca89d6b9afde4e5465 Mon Sep 17 00:00:00 2001 From: Bart De Schuymer Date: Thu, 18 Mar 2010 12:52:48 +0000 Subject: - llu -> PRIu64 conversion - remove warning caused by strict-aliasing rules (Jan Engelhardt) --- libarptc/libarptc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libarptc') diff --git a/libarptc/libarptc.c b/libarptc/libarptc.c index c862694..2dcaaef 100644 --- a/libarptc/libarptc.c +++ b/libarptc/libarptc.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -132,7 +133,7 @@ dump_entry(STRUCT_ENTRY *e, const TC_HANDLE_T handle) printf("%c", e->arp.outiface_mask[i] ? 'X' : '.'); printf("Flags: %02X\n", e->arp.flags); printf("Invflags: %02X\n", e->arp.invflags); - printf("Counters: %llu packets, %llu bytes\n", + printf("Counters: %"PRIu64" packets, %"PRIu64" bytes\n", e->counters.pcnt, e->counters.bcnt); /* printf("Cache: %08X ", e->nfcache); @@ -159,7 +160,8 @@ dump_entry(STRUCT_ENTRY *e, const TC_HANDLE_T handle) t = GET_TARGET(e); printf("Target name: `%s' [%u]\n", t->u.user.name, t->u.target_size); if (strcmp(t->u.user.name, STANDARD_TARGET) == 0) { - int pos = *(int *)t->data; + const unsigned char *data = t->data; + const int pos = *(const int *)data; if (pos < 0) printf("verdict=%s\n", pos == -NF_ACCEPT-1 ? "NF_ACCEPT" -- cgit v1.2.3