Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jun 2017 03:56:13 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r319820 - head/contrib/ipfilter/tools
Message-ID:  <201706110356.v5B3uDRH047178@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Sun Jun 11 03:56:13 2017
New Revision: 319820
URL: https://svnweb.freebsd.org/changeset/base/319820

Log:
  Identify command line syntax errors in poolflush() (ippool -F).

Modified:
  head/contrib/ipfilter/tools/ippool.c

Modified: head/contrib/ipfilter/tools/ippool.c
==============================================================================
--- head/contrib/ipfilter/tools/ippool.c	Sun Jun 11 02:04:39 2017	(r319819)
+++ head/contrib/ipfilter/tools/ippool.c	Sun Jun 11 03:56:13 2017	(r319820)
@@ -557,7 +557,13 @@ poolflush(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, "poolflush: opts = %#x\n", opts);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706110356.v5B3uDRH047178>