From: Roy Marples Date: Thu, 27 Nov 2008 09:45:31 +0000 (+0000) Subject: Fix warning of monotonic clock existence. X-Git-Tag: v4.0.7~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb9618ed639da252921e82f543b8ca3d38744679;p=thirdparty%2Fdhcpcd.git Fix warning of monotonic clock existence. --- diff --git a/common.c b/common.c index d90c7d2f..3e8d92e2 100644 --- a/common.c +++ b/common.c @@ -201,9 +201,8 @@ get_monotonic(struct timeval *tp) if (posix_clock_set == 0) { if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) { posix_clock = CLOCK_MONOTONIC; - clock_monotonic = 1; + clock_monotonic = posix_clock_set = 1; } - posix_clock_set = 1; } if (clock_monotonic) { @@ -225,9 +224,8 @@ get_monotonic(struct timeval *tp) if (posix_clock_set == 0) { if (mach_timebase_info(&info) == KERN_SUCCESS) { factor = (double)info.numer / (double)info.denom; - clock_monotonic = 1; + clock_monotonic = posix_clock_set = 1; } - posix_clock_set = 1; } if (clock_monotonic) { nano = mach_absolute_time();