diff options
author | Cy Schubert <cy@FreeBSD.org> | 2024-05-10 15:15:56 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2024-05-26 22:55:52 +0000 |
commit | 1f833b3fc9968c3dd7ed79ccf0525ebf16c891ad (patch) | |
tree | 85801af20e3b694584668aeb39ecec75ee71f72c /ntpd/cmd_args.c | |
parent | ab1f1aa8333369a83ff284848fc3fc2e52d5f29f (diff) |
Diffstat (limited to 'ntpd/cmd_args.c')
-rw-r--r-- | ntpd/cmd_args.c | 18 |
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++; } } |