summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-11-27 09:45:31 +0000
committerRoy Marples <roy@marples.name>2008-11-27 09:45:31 +0000
commitcb9618ed639da252921e82f543b8ca3d38744679 (patch)
treec3d682af6e161187fac49c6f378e396117870f30
parentd009718fb2ce9f4cdae67bb3530e97b39304a377 (diff)
downloaddhcpcd-cb9618ed639da252921e82f543b8ca3d38744679.tar.xz
Fix warning of monotonic clock existence.
-rw-r--r--common.c6
1 files changed, 2 insertions, 4 deletions
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();