From 1f833b3fc9968c3dd7ed79ccf0525ebf16c891ad Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Fri, 10 May 2024 08:15:56 -0700 Subject: ntp: Vendor import of ntp-4.2.8p18 --- ntpd/cmd_args.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'ntpd/cmd_args.c') 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++; } } -- cgit v1.2.3