From: Juergen Perlinger Date: Fri, 25 Aug 2017 05:24:59 +0000 (+0200) Subject: [Bug 3423] QNX adjtime() implementation error checking is wrong X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1d37bdb6ccecd227725fb5c3c64f8e10e86fbef;p=thirdparty%2Fntp.git [Bug 3423] QNX adjtime() implementation error checking is wrong bk: 599fb4ablwuuzzOaxHtGodMXAqyfcA --- diff --git a/ChangeLog b/ChangeLog index a1a1cfae4..ffb3ecd20 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +--- +* [Bug 3423] QNX adjtime() implementation error checking is wrong + --- (4.2.8p10-win-beta1) 2017/03/21 Released by Harlan Stenn (4.2.8p10) diff --git a/libntp/adjtime.c b/libntp/adjtime.c index a8e65808b..b536cc555 100644 --- a/libntp/adjtime.c +++ b/libntp/adjtime.c @@ -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; /*