Module Name:    src
Committed By:   christos
Date:           Wed Dec 26 18:31:29 UTC 2018

Modified Files:
        src/external/bsd/ntp/dist/ntpdate: ntpdate.c

Log Message:
PR/53813: Edgar Pettijohn: Print usage message if no servers are found.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/ntp/dist/ntpdate/ntpdate.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ntp/dist/ntpdate/ntpdate.c
diff -u src/external/bsd/ntp/dist/ntpdate/ntpdate.c:1.12 src/external/bsd/ntp/dist/ntpdate/ntpdate.c:1.13
--- src/external/bsd/ntp/dist/ntpdate/ntpdate.c:1.12	Sat Sep 29 17:52:34 2018
+++ src/external/bsd/ntp/dist/ntpdate/ntpdate.c	Wed Dec 26 13:31:29 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntpdate.c,v 1.12 2018/09/29 21:52:34 christos Exp $	*/
+/*	$NetBSD: ntpdate.c,v 1.13 2018/12/26 18:31:29 christos Exp $	*/
 
 /*
  * ntpdate - set the time of day by polling one or more NTP servers
@@ -433,6 +433,7 @@ ntpdatemain (
 	    }
 
 	if (errflg) {
+usage:
 		(void) fprintf(stderr,
 		    "usage: %s [-46bBdqsuv] [-a key#] [-e delay] [-k file] [-p samples] [-o version#] [-t timeo] server ...\n",
 		    progname);
@@ -509,7 +510,7 @@ ntpdatemain (
 
 	if (sys_numservers == 0) {
 		msyslog(LOG_ERR, "no servers can be used, exiting");
-		exit(1);
+		goto usage;
 	}
 
 	/*

Reply via email to