summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9d8baf9)
raw | patch | inline | side by side (parent: 9d8baf9)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 17 Feb 2009 08:17:03 +0000 (09:17 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Tue, 17 Feb 2009 08:17:03 +0000 (09:17 +0100) |
src/liboping.c | patch | blob | history |
diff --git a/src/liboping.c b/src/liboping.c
index c93633c8ea7c6cfba58336f394a4d4c9b1c7019e..02125e26c325a443d7a38976e4931f085199239e 100644 (file)
--- a/src/liboping.c
+++ b/src/liboping.c
static int ping_timeval_sub (struct timeval *tv1, struct timeval *tv2,
struct timeval *res)
{
-
if ((tv1->tv_sec < tv2->tv_sec)
|| ((tv1->tv_sec == tv2->tv_sec)
&& (tv1->tv_usec < tv2->tv_usec)))
res->tv_sec = tv1->tv_sec - tv2->tv_sec;
res->tv_usec = tv1->tv_usec - tv2->tv_usec;
- assert ((res->tv_sec > 0) || ((res->tv_sec == 0) && (res->tv_usec > 0)));
+ assert ((res->tv_sec > 0) || ((res->tv_sec == 0) && (res->tv_usec >= 0)));
while (res->tv_usec < 0)
{