[Git][NTPsec/ntpsec][master] There were a few more simple l_fp encapsulations waiting.

Eric S. Raymond gitlab at mg.gitlab.com
Sun Dec 25 13:41:24 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
6ac7531b by Eric S. Raymond at 2016-12-25T08:40:36-05:00
There were a few more simple l_fp encapsulations waiting.

- - - - -


3 changed files:

- ntpd/ntp_refclock.c
- ntpd/ntpd.c
- ntpd/refclock_truetime.c


Changes:

=====================================
ntpd/ntp_refclock.c
=====================================
--- a/ntpd/ntp_refclock.c
+++ b/ntpd/ntp_refclock.c
@@ -392,6 +392,7 @@ refclock_process_f(
 	)
 {
 	l_fp offset, ltemp;
+	uint32_t sec;
 
 	/*
 	 * Compute the timecode timestamp from the days, hours, minutes,
@@ -402,9 +403,10 @@ refclock_process_f(
 	 * the timecode.
 	 */
 	if (!clocktime(pp->day, pp->hour, pp->minute, pp->second, GMT,
-		pp->lastrec.l_ui, &pp->yearstart, &offset.l_ui))
+		       lfpuint(pp->lastrec), &pp->yearstart, &sec))
 		return false;
 
+	setlfpuint(offset, sec);
 	setlfpfrac(offset, 0);
 	DTOLFP(pp->nsec / 1e9, &ltemp);
 	L_ADD(&offset, &ltemp);


=====================================
ntpd/ntpd.c
=====================================
--- a/ntpd/ntpd.c
+++ b/ntpd/ntpd.c
@@ -962,7 +962,7 @@ static void mainloop(void)
 			time_t tnow;
 			get_systime(&snow);
 			time(&tnow);
-			check_leap_file(false, snow.l_ui, &tnow);
+			check_leap_file(false, lfpuint(snow), &tnow);
 			}
 		}
 


=====================================
ntpd/refclock_truetime.c
=====================================
--- a/ntpd/refclock_truetime.c
+++ b/ntpd/refclock_truetime.c
@@ -487,16 +487,18 @@ true_receive(
 			l_fp   off;
 
 #ifdef CLOCK_PPS
+			uint32_t sec;
 			/*
 			 * find out what time it really is. Include
 			 * the count from the PCL720
 			 */
 			if (!clocktime(pp->day, pp->hour, pp->minute, 
-				       pp->second, GMT, pp->lastrec.l_ui, 
-				       &pp->yearstart, &off.l_ui)) {
+				       pp->second, GMT, lfpuint(pp->lastrec),
+				       &pp->yearstart, &sec)) {
 				refclock_report(peer, CEVNT_BADTIME);
 				return;
 			}
+			setlfpuint(off, sec);
 			setlfpfrac(off, 0);
 #endif
 



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/6ac7531bb4a7118eb9bc6229da44185b86bd99a0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20161225/d700e692/attachment.html>


More information about the vc mailing list