From: Harlan Stenn Date: Thu, 30 Apr 2015 04:02:23 +0000 (+0000) Subject: cleanup X-Git-Tag: NTP_4_3_24~1^2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e71b361b9158f0b4ee57988dd967257d18a6f03;p=thirdparty%2Fntp.git cleanup bk: 5541a94fUbNoKqIbEI1s2M3v1_m6LA --- diff --git a/ChangeLog b/ChangeLog index 2df18f356..676a90e00 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,11 @@ --- -* [Bug 2745] ntpd -x steps clock on leap second - Do leap second stepping only of the step adjustment is beyond the - proper jump distance limit and step correction is allowed at all. * CID 1269537: Clean up a line of dead code in getShmTime(). * [Bug 2612] restrict: Warn when 'monitor' can't be disabled because of 'limited'. +* [Bug 2745] ntpd -x steps clock on leap second + Do leap second stepping only of the step adjustment is beyond the + proper jump distance limit and step correction is allowed at all. * [Bug 2794] Clean up kernel clock status reports. * [Bug 2800] refclock_true.c true_debug() can't open debug log because of incompatible open/fdopen parameters. diff --git a/ntpd/ntp_timer.c b/ntpd/ntp_timer.c index 83df025a0..e7e949e14 100644 --- a/ntpd/ntp_timer.c +++ b/ntpd/ntp_timer.c @@ -472,7 +472,7 @@ alarming( # endif # ifdef DEBUG if (debug >= 4) - (void)(0 != write(1, msg, strlen(msg))); + (void)(-1 == write(1, msg, strlen(msg))); # endif } #endif /* SYS_WINNT */ diff --git a/ntpd/refclock_shm.c b/ntpd/refclock_shm.c index c8cf729a3..eb0ee52c3 100644 --- a/ntpd/refclock_shm.c +++ b/ntpd/refclock_shm.c @@ -118,6 +118,7 @@ struct shmunit { time_t max_delay; /* age/stale limit */ }; + static struct shmTime* getShmTime( int unit, @@ -145,8 +146,8 @@ getShmTime( msyslog(LOG_ERR, "SHM shmat (unit %d): %m", unit); return NULL; } - return p; + return p; #else static const char * nspref[2] = { "Local", "Global" }; @@ -202,6 +203,8 @@ getShmTime( /* NOTREACHED */ ENSURE(!"getShmTime(): Not reached."); } + + /* * shm_start - attach to shared memory */