]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix timeval -> poll conversion.
authorRoy Marples <roy@marples.name>
Thu, 10 Jul 2008 18:39:34 +0000 (18:39 +0000)
committerRoy Marples <roy@marples.name>
Thu, 10 Jul 2008 18:39:34 +0000 (18:39 +0000)
client.c

index 27c0825a585e0697cc2d4c3570853f5fc9ef9920..f4626e2d54a5537e74111c37df2c5f405c2bf27d 100644 (file)
--- 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;
                        }