aboutsummaryrefslogtreecommitdiff
path: root/ntpd/cmd_args.c
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2024-05-10 15:15:56 +0000
committerCy Schubert <cy@FreeBSD.org>2024-05-26 22:55:52 +0000
commit1f833b3fc9968c3dd7ed79ccf0525ebf16c891ad (patch)
tree85801af20e3b694584668aeb39ecec75ee71f72c /ntpd/cmd_args.c
parentab1f1aa8333369a83ff284848fc3fc2e52d5f29f (diff)
Diffstat (limited to 'ntpd/cmd_args.c')
-rw-r--r--ntpd/cmd_args.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/ntpd/cmd_args.c b/ntpd/cmd_args.c
index aa461cb4dbe6..a604feb00b54 100644
--- a/ntpd/cmd_args.c
+++ b/ntpd/cmd_args.c
@@ -178,16 +178,14 @@ getCmdOpts(
if (HAVE_OPT( UPDATEINTERVAL )) {
long val = OPT_VALUE_UPDATEINTERVAL;
-
- if (val >= 0)
- interface_interval = val;
- else {
- fprintf(stderr,
- "command line interface update interval %ld must not be negative\n",
- val);
- msyslog(LOG_ERR,
- "command line interface update interval %ld must not be negative",
- val);
+ const char errfmt[] =
+ "-U/--updateinterval %ld must be >= 0\n";
+
+ if (val >= 0) {
+ endpt_scan_period = val;
+ } else {
+ fprintf(stderr, errfmt, val);
+ msyslog(LOG_ERR, errfmt, val);
errflg++;
}
}