diff options
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++; } } |