]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 3423] QNX adjtime() implementation error checking is wrong
authorJuergen Perlinger <perlinger@ntp.org>
Fri, 25 Aug 2017 05:24:59 +0000 (07:24 +0200)
committerJuergen Perlinger <perlinger@ntp.org>
Fri, 25 Aug 2017 05:24:59 +0000 (07:24 +0200)
bk: 599fb4ablwuuzzOaxHtGodMXAqyfcA

ChangeLog
libntp/adjtime.c

index a1a1cfae45a59975bb12958d206f6c0a48e631b5..ffb3ecd20fca2996fc987a5dde4ab1349b599916 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+---
+* [Bug 3423] QNX adjtime() implementation error checking is wrong <perlinger@ntp.org>
+
 ---
 (4.2.8p10-win-beta1) 2017/03/21 Released by Harlan Stenn <stenn@ntp.org>
 (4.2.8p10)
index a8e65808bf2915e2afce400def4a0f106ccfb05d..b536cc555d9a36cdb179129b6bbb29ffcccdd88b 100644 (file)
@@ -314,7 +314,7 @@ adjtime (struct timeval *delta, struct timeval *olddelta)
        /*
         * Get the current clock period (nanoseconds)
         */
-       if (ClockPeriod (CLOCK_REALTIME, 0, &period, 0) < 0)
+       if (ClockPeriod (CLOCK_REALTIME, 0, &period, 0) == -1)
            return -1;
 
        /*
@@ -354,7 +354,7 @@ adjtime (struct timeval *delta, struct timeval *olddelta)
        adj.tick_count = 0;
     }
 
-    if (ClockAdjust (CLOCK_REALTIME, &adj, &oldadj) < 0)
+    if (ClockAdjust (CLOCK_REALTIME, &adj, &oldadj) == -1)
        return -1;
 
     /*