[Git][NTPsec/ntpsec][master] Fix argument-passing both in ntpfrob.
Eric S. Raymond
gitlab at mg.gitlab.com
Fri Sep 9 12:48:35 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
8e24141e by Eric S. Raymond at 2016-09-09T08:47:52-04:00
Fix argument-passing both in ntpfrob.
- - - - -
3 changed files:
- ntpfrob/main.c
- ntpfrob/ntpfrob.h
- ntpfrob/tickadj.c
Changes:
=====================================
ntpfrob/main.c
=====================================
--- a/ntpfrob/main.c
+++ b/ntpfrob/main.c
@@ -22,7 +22,7 @@ main(int argc, char **argv)
switch (ch) {
case 'A':
#ifdef HAVE_ADJTIMEX
- tickadj(json, 0);
+ tickadj(mode==json, 0);
#else
fputs("ntpfrob: no adjtimex(2) call.\n", stderr);
exit(0);
=====================================
ntpfrob/ntpfrob.h
=====================================
--- a/ntpfrob/ntpfrob.h
+++ b/ntpfrob/ntpfrob.h
@@ -4,7 +4,7 @@
typedef enum {plain_text, raw, json} iomode;
extern void ppscheck(char *device);
-extern void tickadj(const iomode mode, const int tick);
+extern void tickadj(const bool mode, const int tick);
extern void bumpclock(int);
extern void jitter(const iomode mode);
extern void stepback(void);
=====================================
ntpfrob/tickadj.c
=====================================
--- a/ntpfrob/tickadj.c
+++ b/ntpfrob/tickadj.c
@@ -26,10 +26,8 @@
static struct timex txc;
#endif /* HAVE_ADJTIMEX */
-void tickadj(const iomode mode, const int newtick)
+void tickadj(const bool json, const int newtick)
{
- UNUSED_ARG(mode);
-
#ifndef HAVE_ADJTIMEX
UNUSED_ARG(newtick);
fputs("ntpfrob: \n", stderr);
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/8e24141e26167ce0c8ee2af831d8d3e34070f413
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160909/3bacb3e7/attachment.html>
More information about the vc
mailing list