[Git][NTPsec/ntpsec][master] 11 commits: fix some -Wfloat-equal warnings
Gary E. Miller
gitlab at mg.gitlab.com
Sat Apr 22 04:45:32 UTC 2017
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
087f7e74 by Trevor N at 2017-04-20T01:18:36-04:00
fix some -Wfloat-equal warnings
Checked fudgetime1&2 values input from the configuration file and from ntpq's config command.
- - - - -
d5f1b309 by Matt Selsky at 2017-04-20T23:40:47-04:00
Typo
- - - - -
8b3fa8bf by James Browning at 2017-04-20T23:40:47-04:00
Fix typo in etc/ntplogtemp.service
- - - - -
108f1d99 by Gary E. Miller at 2017-04-20T23:40:47-04:00
waf: define EPOCH=[build-date], for reproducable builds.
Sort of per: https://reproducible-builds.org/specs/source-date-epoch/
EPOCH is set to the first of:
--epoch=[seconds of UNIX epoch]
SOURCE_DATE_EPOCH from the environment
configure time seconds of UNIX epoch
The spec would prefer the last source modification for the last one,
but close enough for now.
- - - - -
349eca8a by Gary E. Miller at 2017-04-20T23:40:47-04:00
EPOCH: remove REPRO_DATE and NTPD_IGNORE_BUILD_DATE.
They do not comply with the repro build spec. Will be replaced
by EPOCH.
- - - - -
eb109f5c by Gary E. Miller at 2017-04-20T23:40:47-04:00
ntpcal_get_build_date: now uses EPOCH.
Another step to reproduceable build.
- - - - -
481199aa by Gary E. Miller at 2017-04-20T23:40:47-04:00
ntp_calendar: add missing return.
- - - - -
6107e4df by Gary E. Miller at 2017-04-20T23:40:47-04:00
magnavox: remove last __DATE__.
--epoch now seems fully implemented.
- - - - -
268df5f1 by Gary E. Miller at 2017-04-20T23:40:47-04:00
EPOCH: remove all mention of __DATE__ and __TIME__
Use EPOCH instead.
- - - - -
7e4236e9 by Gary E. Miller at 2017-04-20T23:40:47-04:00
EPOCH: add URL to reproduceable build information.
- - - - -
4162ff74 by Trevor N at 2017-04-22T00:04:11-04:00
Merge branch 'master' of https://gitlab.com/NTPsec/ntpsec
- - - - -
2 changed files:
- include/timespecops.h
- ntpd/ntp_refclock.c
Changes:
=====================================
include/timespecops.h
=====================================
--- a/include/timespecops.h
+++ b/include/timespecops.h
@@ -72,6 +72,9 @@
/* nano seconds per millisecond */
#define NS_PER_MS 1000000;
+/* returns true if a time stored as a double is close to zero */
+#define D_ISZERO_NS(t) (fabs(t) < S_PER_NS/10.0)
+
/* predicate: returns true if the nanoseconds are in nominal range */
#define timespec_isnormal(x) ((x)->tv_nsec >= 0 && (x)->tv_nsec < NS_PER_S)
=====================================
ntpd/ntp_refclock.c
=====================================
--- a/ntpd/ntp_refclock.c
+++ b/ntpd/ntp_refclock.c
@@ -917,10 +917,10 @@ refclock_control(
out->fudgeval2 = pp->refid;
out->haveflags = CLK_HAVEVAL1 | CLK_HAVEVAL2;
out->fudgetime1 = pp->fudgetime1;
- if (0.0 != out->fudgetime1)
+ if (!D_ISZERO_NS(out->fudgetime1))
out->haveflags |= CLK_HAVETIME1;
out->fudgetime2 = pp->fudgetime2;
- if (0.0 != out->fudgetime2)
+ if (!D_ISZERO_NS(out->fudgetime2))
out->haveflags |= CLK_HAVETIME2;
out->flags = (uint8_t) pp->sloppyclockflag;
if (CLK_FLAG1 & out->flags)
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/fef5b1169e83d00e13dcc59ca6d4534c19b045df...4162ff742344a8a5b0579d66369c8d6e48f4ee96
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/fef5b1169e83d00e13dcc59ca6d4534c19b045df...4162ff742344a8a5b0579d66369c8d6e48f4ee96
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170422/06e99ed6/attachment.html>
More information about the vc
mailing list