diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2010-12-30 23:03:28 +0100 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2010-12-30 23:07:25 +0100 |
commit | 3e456f175a6e25e30e60934ff08c7108b1f86654 (patch) | |
tree | 0b704f6e89ad13e54ff0bf4d9968b017139c20fe /utils/ulog_test.c | |
parent | 6f236834592023b7c40e5cca51eb07d7c8202f3c (diff) |
utils: resolve compiler warnings
make nfulnl_test ulog_test
make[1]: Entering directory `/home/jengelh/code/libnetfilter_log/utils'
CC nfulnl_test.o
nfulnl_test.c: In function "cb":
nfulnl_test.c:47:1: warning: no return statement in function returning non-void
nfulnl_test.c: In function "main":
nfulnl_test.c:102:20: warning: unused variable "nlh"
CCLD nfulnl_test
CC ulog_test.o
ulog_test.c: In function "handle_packet":
ulog_test.c:27:9: warning: format "%d" expects type ‘int’, but argument 4 has type ‘size_t’
ulog_test.c: In function "main":
ulog_test.c:79:3: warning: suggest parentheses around assignment used as truth value
CCLD ulog_test
make[1]: Leaving directory `/home/jengelh/code/libnetfilter_log/utils'
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'utils/ulog_test.c')
-rw-r--r-- | utils/ulog_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/ulog_test.c b/utils/ulog_test.c index d568aa4..f3adec2 100644 --- a/utils/ulog_test.c +++ b/utils/ulog_test.c @@ -23,7 +23,7 @@ void handle_packet(ulog_packet_msg_t *pkt) unsigned char *p; int i; - printf("Hook=%u Mark=%lu len=%d ", + printf("Hook=%u Mark=%lu len=%zu ", pkt->hook, pkt->mark, pkt->data_len); if (strlen(pkt->prefix)) printf("Prefix=%s ", pkt->prefix); @@ -76,7 +76,7 @@ int main(int argc, char *argv[]) exit(1); } printf("%d bytes received\n", len); - while (upkt = ipulog_get_packet(h, buf, len)) { + while ((upkt = ipulog_get_packet(h, buf, len)) != NULL) { handle_packet(upkt); } } |