[ntp:hackers] Compiling NTP on ARM

Gary E. Miller gem at rellim.com
Wed Apr 8 01:16:43 UTC 2015


Yo Harlan!

On Tue, 07 Apr 2015 23:40:28 +0000
Harlan Stenn <stenn at ntp.org> wrote:

>  http://bugs.ntp.org/show_bug.cgi?id=2803


First patch, comments welcome:

commit ec9dfe1c22d83b5b8a31be2575538bb7e8ad92d3
Author: Gary E. Miller <gem at rellim.com>
Date:   Tue Apr 7 18:13:17 2015 -0700

    Pacify -Wstrict-overflow
    
    systime.c:461:5: warning: assuming signed overflow does not occur when simpli

diff --git a/libntp/systime.c b/libntp/systime.c
index f5eabcd..ef70122 100644
--- a/libntp/systime.c
+++ b/libntp/systime.c
@@ -458,7 +458,7 @@ step_systime(
         * This might become even Uglier...
         */
        tvdiff = abs_tval(sub_tval(timetv, tvlast));
-       if (tvdiff.tv_sec > 0) {
+       if ( abs(tvdiff.tv_sec) == tvdiff.tv_sec ) {
 #ifdef HAVE_UTMP_H
                struct utmp ut;
 #endif




RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
	gem at rellim.com  Tel:+1(541)382-8588


More information about the hackers mailing list