[Git][NTPsec/ntpsec][master] 3 commits: parse: remove old y2k code long commented out.
Gary E. Miller
gitlab at mg.gitlab.com
Thu May 25 18:58:30 UTC 2017
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
64ce9c9a by Gary E. Miller at 2017-05-25T11:52:02-07:00
parse: remove old y2k code long commented out.
- - - - -
188b13e0 by Gary E. Miller at 2017-05-25T11:54:10-07:00
data_mbg: remove commented out and unused array.
- - - - -
b3b16810 by Gary E. Miller at 2017-05-25T11:57:11-07:00
refclocK_gpsd: remove unused json shim.
- - - - -
3 changed files:
- libparse/data_mbg.c
- libparse/parse.c
- ntpd/refclock_gpsd.c
Changes:
=====================================
libparse/data_mbg.c
=====================================
--- a/libparse/data_mbg.c
+++ b/libparse/data_mbg.c
@@ -22,10 +22,8 @@ static void get_mbg_tgps (unsigned char **, T_GPS *);
static void get_mbg_tm (unsigned char **, TM_GPS *);
static void mbg_time_status_str (char **, unsigned int, size_t);
-#if 0 /* no actual floats on Meinberg binary interface */
-static offsets_t mbg_float = { 1, 0, 3, 2, 0, 0, 0, 0 }; /* byte order for meinberg floats */
-#endif
-static offsets_t mbg_double = { 1, 0, 3, 2, 5, 4, 7, 6 }; /* byte order for meinberg doubles */
+/* byte order for meinberg doubles */
+static offsets_t mbg_double = { 1, 0, 3, 2, 5, 4, 7, 6 };
#define RAD2DEG 57.2957795131 /* 180/PI */
=====================================
libparse/parse.c
=====================================
--- a/libparse/parse.c
+++ b/libparse/parse.c
@@ -317,14 +317,8 @@ parse_to_unixtime(
return -1; /* bad month */
}
-#if 0 /* Y2KFixes */
- /* adjust leap year */
- if (clock_time->month < 3 && days_per_year(clock_time->year) == 366)
- t--;
-#else /* Y2KFixes [ */
if ( clock_time->month >= 3 && is_leapyear(clock_time->year) )
t++; /* add one more if within leap year */
-#endif /* Y2KFixes ] */
for (i = 1; i < clock_time->month; i++)
{
=====================================
ntpd/refclock_gpsd.c
=====================================
--- a/ntpd/refclock_gpsd.c
+++ b/ntpd/refclock_gpsd.c
@@ -1300,28 +1300,6 @@ json_object_lookup_int_default(
}
/* ------------------------------------------------------------------ */
-#if 0 /* currently unused */
-static double
-json_object_lookup_float(
- const json_ctx * ctx,
- tok_ref tid,
- const char * key)
-{
- double ret;
- const char * cp;
- char * ep;
-
- cp = json_object_lookup_primitive(ctx, tid, key);
- if (NULL != cp) {
- ret = strtod(cp, &ep);
- if (cp != ep && '\0' == *ep)
- return ret;
- } else {
- errno = EINVAL;
- }
- return 0.0;
-}
-#endif
static double
json_object_lookup_float_default(
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/8aac9ff85888e5961c03835516111160f9e4eb5a...b3b168105215bfe2ec1ccb9a893a95ea5507b8a3
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/8aac9ff85888e5961c03835516111160f9e4eb5a...b3b168105215bfe2ec1ccb9a893a95ea5507b8a3
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/20170525/a5ba4d92/attachment.html>
More information about the vc
mailing list