From d05afd22528d41b17d70a240cd45a2de69b6e2cc Mon Sep 17 00:00:00 2001 From: Cy Schubert Date: Sun, 11 Jun 2017 04:00:26 +0000 Subject: [PATCH] Identify poolstats() (ippool -s) command line syntax errors. --- contrib/ipfilter/tools/ippool.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/ipfilter/tools/ippool.c b/contrib/ipfilter/tools/ippool.c index d043d0179e0..aff39217a75 100644 --- a/contrib/ipfilter/tools/ippool.c +++ b/contrib/ipfilter/tools/ippool.c @@ -451,8 +451,14 @@ poolstats(argc, argv) case 'v' : opts |= OPT_VERBOSE; break; + default : + usage(argv[0]); + break; /* keep compiler happy */ } + if (argc - 1 - optind > 0) + usage(argv[0]); + if (opts & OPT_DEBUG) fprintf(stderr, "poolstats: opts = %#x\n", opts);