Module Name: src
Committed By: christos
Date: Sat Jun 11 19:15:58 UTC 2022
Modified Files:
src/external/bsd/blocklist/bin: blocklistd.c
Log Message:
fix usage error (Jose Luis Duran)
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/blocklist/bin/blocklistd.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/blocklist/bin/blocklistd.c
diff -u src/external/bsd/blocklist/bin/blocklistd.c:1.1.1.1 src/external/bsd/blocklist/bin/blocklistd.c:1.2
--- src/external/bsd/blocklist/bin/blocklistd.c:1.1.1.1 Sun Jun 14 21:52:53 2020
+++ src/external/bsd/blocklist/bin/blocklistd.c Sat Jun 11 15:15:58 2022
@@ -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 @@ sigdone(int n __unused)
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 @@ main(int argc, char *argv[])
argc -= optind;
if (argc)
- usage(0);
+ usage('?');
signal(SIGHUP, sighup);
signal(SIGINT, sigdone);