Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/ntp/dist/ntpdate PR/53813: Edgar Pettijohn: Pri...



details:   https://anonhg.NetBSD.org/src/rev/ba62b38f4833
branches:  trunk
changeset: 446954:ba62b38f4833
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Dec 26 18:31:29 2018 +0000

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

diffstat:

 external/bsd/ntp/dist/ntpdate/ntpdate.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 3006b2dc4712 -r ba62b38f4833 external/bsd/ntp/dist/ntpdate/ntpdate.c
--- a/external/bsd/ntp/dist/ntpdate/ntpdate.c   Wed Dec 26 14:27:23 2018 +0000
+++ b/external/bsd/ntp/dist/ntpdate/ntpdate.c   Wed Dec 26 18:31:29 2018 +0000
@@ -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 @@
            }
 
        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 @@
 
        if (sys_numservers == 0) {
                msyslog(LOG_ERR, "no servers can be used, exiting");
-               exit(1);
+               goto usage;
        }
 
        /*



Home | Main Index | Thread Index | Old Index