From: Roy Marples Date: Sat, 26 Jul 2008 07:32:44 +0000 (+0000) Subject: Move the seconds waiting calc into the if where it's needed. X-Git-Tag: v4.0.2~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97b9e4cf4ec8360051c27dd456eba8d03b08186a;p=thirdparty%2Fdhcpcd.git Move the seconds waiting calc into the if where it's needed. --- diff --git a/client.c b/client.c index 4e0ce35e..7b3c2e66 100644 --- a/client.c +++ b/client.c @@ -799,13 +799,13 @@ wait_for_fd(struct if_state *state, int *fd) if (ref) { timersub(ref, &now, &tout); - secs = tout.tv_sec * 1.0 + tout.tv_usec * 1.0e-6; /* Only report waiting time if changed */ if (last_stop_sec != state->stop.tv_sec || last_stop_usec != state->stop.tv_usec || last_timeout_sec != state->timeout.tv_sec || last_timeout_usec != state->timeout.tv_usec) { + secs = tout.tv_sec * 1.0 + tout.tv_usec * 1.0e-6; logger(LOG_DEBUG, "waiting for %0.2f seconds", secs); last_stop_sec = state->stop.tv_sec; last_stop_usec = state->stop.tv_usec;