Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/blocklist/bin fix usage error (Jose Luis Duran)



details:   https://anonhg.NetBSD.org/src/rev/185f5e8217d0
branches:  trunk
changeset: 366747:185f5e8217d0
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jun 11 19:15:58 2022 +0000

description:
fix usage error (Jose Luis Duran)

diffstat:

 external/bsd/blocklist/bin/blocklistd.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 12cececd77c4 -r 185f5e8217d0 external/bsd/blocklist/bin/blocklistd.c
--- a/external/bsd/blocklist/bin/blocklistd.c   Sat Jun 11 18:30:02 2022 +0000
+++ b/external/bsd/blocklist/bin/blocklistd.c   Sat Jun 11 19:15:58 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: blocklistd.c,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $      */
+/*     $NetBSD: blocklistd.c,v 1.2 2022/06/11 19:15:58 christos Exp $  */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include "config.h"
 #endif
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: blocklistd.c,v 1.1.1.1 2020/06/15 01:52:53 christos Exp $");
+__RCSID("$NetBSD: blocklistd.c,v 1.2 2022/06/11 19:15:58 christos Exp $");
 
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -105,7 +105,7 @@
 static __dead void
 usage(int c)
 {
-       if (c)
+       if (c != '?')
                warnx("Unknown option `%c'", (char)c);
        fprintf(stderr, "Usage: %s [-vdfr] [-c <config>] [-R <rulename>] "
            "[-P <sockpathsfile>] [-C <controlprog>] [-D <dbfile>] "
@@ -474,7 +474,7 @@
 
        argc -= optind;
        if (argc)
-               usage(0);
+               usage('?');
 
        signal(SIGHUP, sighup);
        signal(SIGINT, sigdone);



Home | Main Index | Thread Index | Old Index