diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2010-03-18 12:52:48 +0000 |
---|---|---|
committer | Bart De Schuymer <bdschuym@pandora.be> | 2010-03-18 12:52:48 +0000 |
commit | ab0b15ee5b334f45da4b53ca89d6b9afde4e5465 (patch) | |
tree | 6645f7c923c789c8836ce96d9affe243ffe08847 /libarptc | |
parent | 317f935c2ea2c4a2b73cc0998d12b6adb6f1a4e2 (diff) |
- llu -> PRIu64 conversion
- remove warning caused by strict-aliasing rules (Jan Engelhardt)
Diffstat (limited to 'libarptc')
-rw-r--r-- | libarptc/libarptc.c | 6 |
1 files changed, 4 insertions, 2 deletions
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 <string.h> #include <errno.h> #include <stdlib.h> +#include <inttypes.h> #include <stdio.h> #include <unistd.h> @@ -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" |