From: Roy Marples Date: Thu, 10 Jul 2008 18:39:34 +0000 (+0000) Subject: Fix timeval -> poll conversion. X-Git-Tag: v4.0.2~207 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19354f0b7456c8e3aafb652ec2b5adb0bf9e7713;p=thirdparty%2Fdhcpcd.git Fix timeval -> poll conversion. --- diff --git a/client.c b/client.c index 27c0825a..f4626e2d 100644 --- a/client.c +++ b/client.c @@ -686,11 +686,11 @@ wait_for_packet(struct if_state *state) timeout = INFTIM; } else { timersub(&state->timeout, &now, &d); - timeout = d.tv_sec * 1000 + (d.tv_usec + 999) / 1000; + timeout = (d.tv_sec * 1000 + (d.tv_usec + 999)) / 1000; if (timerisset(&state->stop)) { if (timercmp(&state->stop, &now, >)) { timersub(&state->stop, &now, &d); - retval = d.tv_sec * 1000 + (d.tv_usec + 999) / 1000; + retval = (d.tv_sec * 1000 + (d.tv_usec + 999)) / 1000; if (retval < timeout) timeout = retval; }