summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2010-03-18 12:59:16 +0000
committerBart De Schuymer <bdschuym@pandora.be>2010-03-18 12:59:16 +0000
commita8a90792dbe91a698f2cf037e65d8742494a0811 (patch)
tree685f628b5480b26c22253ffe02d94823a22886d5
parentc3b7ce9e331491af9a763a6a80e8cacab4d7d11d (diff)
- use zu
- remove warning caused by strict-aliasing rules (Jan Engelhardt)
-rw-r--r--userspace/arptables/libarptc/libarptc_incl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/userspace/arptables/libarptc/libarptc_incl.c b/userspace/arptables/libarptc/libarptc_incl.c
index 35736db..6322ba3 100644
--- a/userspace/arptables/libarptc/libarptc_incl.c
+++ b/userspace/arptables/libarptc/libarptc_incl.c
@@ -1,4 +1,4 @@
-/* Library which manipulates firewall rules. Version $Revision: 1.6 $ */
+/* Library which manipulates firewall rules. Version $Revision: 1.7 $ */
/* Architecture of firewall rules is as follows:
*
@@ -121,7 +121,7 @@ entry2index(const TC_HANDLE_T h, const STRUCT_ENTRY *seek)
if (ENTRY_ITERATE(h->entries.entrytable, h->entries.size,
get_number, seek, &pos) == 0) {
- fprintf(stderr, "ERROR: offset %i not an entry!\n",
+ fprintf(stderr, "ERROR: offset %zu not an entry!\n",
(char *)seek - (char *)h->entries.entrytable);
abort();
}
@@ -581,6 +581,7 @@ static const char *
target_name(TC_HANDLE_T handle, const STRUCT_ENTRY *ce)
{
int spos;
+ const unsigned char *data;
unsigned int labelidx;
STRUCT_ENTRY *jumpto;
@@ -591,7 +592,8 @@ target_name(TC_HANDLE_T handle, const STRUCT_ENTRY *ce)
return GET_TARGET(e)->u.user.name;
/* Standard target: evaluate */
- spos = *(int *)GET_TARGET(e)->data;
+ data = GET_TARGET(e)->data;
+ spos = *(const int *)data;
if (spos < 0) {
if (spos == RETURN)
return LABEL_RETURN;