diff options
| author | Roy Marples <roy@marples.name> | 2008-11-27 09:45:13 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-11-27 09:45:13 +0000 |
| commit | a4398c7a4ba3614103396b20754409b0531a57d1 (patch) | |
| tree | b9db1fb390ceaaee1a570ced3a9da2c7d0fa297c /common.c | |
| parent | ddeace4bd49828ef6389f59745766119a514095b (diff) | |
| download | dhcpcd-a4398c7a4ba3614103396b20754409b0531a57d1.tar.xz | |
Fix warning of monotonic clock existence.
Diffstat (limited to 'common.c')
| -rw-r--r-- | common.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -218,9 +218,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) { @@ -242,9 +241,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(); |
