summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d5d694c)
raw | patch | inline | side by side (parent: d5d694c)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 17 Feb 2009 13:52:33 +0000 (14:52 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 17 Feb 2009 13:52:33 +0000 (14:52 +0100) |
Use the "%zu" format string instead.
src/liboping.c | patch | blob | history | |
src/oping.c | patch | blob | history |
diff --git a/src/liboping.c b/src/liboping.c
index 99d491adedccda2af3f9e4a561bea64c94dff7b0..e318145d0b99e5351db955af847dad2d499b419f 100644 (file)
--- a/src/liboping.c
+++ b/src/liboping.c
return (-1);
}
- dprintf ("Read %u bytes from fd = %i\n", (unsigned int) buffer_len, fd);
+ dprintf ("Read %zu bytes from fd = %i\n", buffer_len, fd);
if (sa.ss_family == AF_INET)
{
diff --git a/src/oping.c b/src/oping.c
index 3201e85dc0f8808268f467d4337ae9a137d7ee64..0c759c1e20b8752c05125e294deb365fb7b8760f 100644 (file)
--- a/src/oping.c
+++ b/src/oping.c
if ((context->latency_min < 0.0) || (context->latency_min > latency))
context->latency_min = latency;
- printf ("%u bytes from %s (%s): icmp_seq=%u time=%.2f ms\n",
- (unsigned int) data_len,
+ printf ("%zu bytes from %s (%s): icmp_seq=%u time=%.2f ms\n",
+ data_len,
context->host, context->addr,
- (unsigned int) sequence, latency);
+ sequence, latency);
}
else
{
printf ("echo reply from %s (%s): icmp_seq=%u timeout\n",
context->host, context->addr,
- (unsigned int) sequence);
+ sequence);
}
}
buffer_size = 0;
ping_iterator_get_info (iter, PING_INFO_DATA, NULL, &buffer_size);
- printf ("PING %s (%s) %u bytes of data.\n",
- context->host, context->addr, (unsigned int) buffer_size);
+ printf ("PING %s (%s) %zu bytes of data.\n",
+ context->host, context->addr, buffer_size);
ping_iterator_set_context (iter, (void *) context);