summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 30def04)
raw | patch | inline | side by side (parent: 30def04)
author | Florian Forster <octo@verplant.org> | |
Wed, 17 Nov 2010 08:01:19 +0000 (09:01 +0100) | ||
committer | Florian Forster <octo@verplant.org> | |
Wed, 17 Nov 2010 08:01:19 +0000 (09:01 +0100) |
This should fix the following warning / error:
liboping.c:599: warning: comparison is always true due to limited
range of data type
Thanks to James Bromberger for reporting this!
liboping.c:599: warning: comparison is always true due to limited
range of data type
Thanks to James Bromberger for reporting this!
src/liboping.c | patch | blob | history |
diff --git a/src/liboping.c b/src/liboping.c
index a272e2cb92f7051ad964be0f20f67874fefc2b21..46168434d0c62046d0c9b4f07583009d050674d2 100644 (file)
--- a/src/liboping.c
+++ b/src/liboping.c
/* Iterate over all auxiliary data in msghdr */
recv_ttl = -1;
- recv_qos = 0xff;
+ recv_qos = 0;
for (cmsg = CMSG_FIRSTHDR (&msghdr); /* {{{ */
cmsg != NULL;
cmsg = CMSG_NXTHDR (&msghdr, cmsg))
if (recv_ttl >= 0)
host->recv_ttl = recv_ttl;
- if (recv_qos != 0xffff)
- host->recv_qos = recv_qos;
+ host->recv_qos = recv_qos;
host->latency = ((double) diff.tv_usec) / 1000.0;
host->latency += ((double) diff.tv_sec) * 1000.0;