[Git][NTPsec/ntpsec][master] cast tv_sec to long as we do everywhere else

Matt Selsky gitlab at mg.gitlab.com
Thu Dec 29 16:16:42 UTC 2016


Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
2bbf79a8 by Matt Selsky at 2016-12-29T01:11:28-05:00
cast tv_sec to long as we do everywhere else

Partially fixes #217 on OpenBSD 6.0

- - - - -


1 changed file:

- ntpd/refclock_shm.c


Changes:

=====================================
ntpd/refclock_shm.c
=====================================
--- a/ntpd/refclock_shm.c
+++ b/ntpd/refclock_shm.c
@@ -519,8 +519,8 @@ shm_timer(
 	 * that interpretation is best left to higher levels.
 	 */
 	/* a_lastcode is seen as timecode with: ntpq -c cv [associd] */
-	c = snprintf(pp->a_lastcode, sizeof(pp->a_lastcode),
-		     "%ld.%09ld", shm_stat.tvt.tv_sec,	shm_stat.tvt.tv_nsec);
+	c = snprintf(pp->a_lastcode, sizeof(pp->a_lastcode), "%ld.%09ld",
+		     (long)shm_stat.tvt.tv_sec, shm_stat.tvt.tv_nsec);
 	pp->lencode = (c < (int)sizeof(pp->a_lastcode)) ? c : 0;
 
 	/* check 1: age control of local time stamp */



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/2bbf79a8ebd0014ae8a0ea65fe7a4f3488b3a185
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20161229/4d31151b/attachment.html>


More information about the vc mailing list