From: Florian Forster Date: Fri, 17 Jul 2009 12:32:56 +0000 (+0200) Subject: src/liboping.c: Fix some format strings. X-Git-Tag: liboping-1.3.0~10 X-Git-Url: https://git.octo.it/?p=liboping.git;a=commitdiff_plain;h=3ed22ab6a9f4a6fb78513ca7706dc58d7bf95912 src/liboping.c: Fix some format strings. --- diff --git a/src/liboping.c b/src/liboping.c index 87aa654..b21188b 100644 --- a/src/liboping.c +++ b/src/liboping.c @@ -307,7 +307,8 @@ static pinghost_t *ping_receive_ipv4 (pingobj_t *obj, char *buffer, if (recv_checksum != calc_checksum) { - dprintf ("Checksum missmatch: Got 0x%04x, calculated 0x%04x\n", + dprintf ("Checksum missmatch: Got 0x%04"PRIx16", " + "calculated 0x%04"PRIx16"\n", recv_checksum, calc_checksum); return (NULL); } @@ -334,7 +335,8 @@ static pinghost_t *ping_receive_ipv4 (pingobj_t *obj, char *buffer, if (((ptr->sequence - 1) & 0xFFFF) != seq) continue; - dprintf ("Match found: hostname = %s, ident = 0x%04x, seq = %i\n", + dprintf ("Match found: hostname = %s, ident = 0x%04"PRIx16", " + "seq = %"PRIu16"\n", ptr->hostname, ident, seq); break; @@ -342,7 +344,7 @@ static pinghost_t *ping_receive_ipv4 (pingobj_t *obj, char *buffer, if (ptr == NULL) { - dprintf ("No match found for ident = 0x%04x, seq = %i\n", + dprintf ("No match found for ident = 0x%04"PRIx16", seq = %"PRIu16"\n", ident, seq); } @@ -419,7 +421,8 @@ static pinghost_t *ping_receive_ipv6 (pingobj_t *obj, char *buffer, if (((ptr->sequence - 1) & 0xFFFF) != seq) continue; - dprintf ("Match found: hostname = %s, ident = 0x%04x, seq = %i\n", + dprintf ("Match found: hostname = %s, ident = 0x%04"PRIx16", " + "seq = %"PRIu16"\n", ptr->hostname, ident, seq); break; @@ -427,7 +430,8 @@ static pinghost_t *ping_receive_ipv6 (pingobj_t *obj, char *buffer, if (ptr == NULL) { - dprintf ("No match found for ident = 0x%04x, seq = %i\n", + dprintf ("No match found for ident = 0x%04"PRIx16", " + "seq = %"PRIu16"\n", ident, seq); }