[Git][NTPsec/ntpsec][master] Fix for vint64 encapsulation patch.
Eric S. Raymond
gitlab at mg.gitlab.com
Sun Sep 18 01:26:55 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
932302b7 by Eric S. Raymond at 2016-09-17T21:25:59-04:00
Fix for vint64 encapsulation patch.
- - - - -
2 changed files:
- libntp/ntp_calendar.c
- libntp/vint64ops.c
Changes:
=====================================
libntp/ntp_calendar.c
=====================================
--- a/libntp/ntp_calendar.c
+++ b/libntp/ntp_calendar.c
@@ -384,7 +384,7 @@ ntpcal_ntp_to_time(
vint64 res;
setvint64s(res, (pivot != NULL) ? *pivot : now());
- setvint64u(res, vint64s(res)-0x80000000); /* unshift of half range */
+ setvint64u(res, vint64u(res)-0x80000000); /* unshift of half range */
ntp -= (uint32_t)JAN_1970; /* warp into UN*X domain */
ntp -= vint64lo(res); /* cycle difference */
setvint64u(res, vint64u(res)+(uint64_t)ntp); /* get expanded time */
=====================================
libntp/vint64ops.c
=====================================
--- a/libntp/vint64ops.c
+++ b/libntp/vint64ops.c
@@ -211,7 +211,7 @@ addv64u32(
vint64 res;
res = *lhs;
- res.Q_s += rhs;
+ setvint64u(res, vint64u(res) + rhs);
return res;
}
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/932302b7b016a45d0d2c357417035ce3b6d5fc22
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160918/c1bf5355/attachment.html>
More information about the vc
mailing list