Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jun 2017 04:03:10 +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: r319822 - head/contrib/ipfilter/tools
Message-ID:  <201706110403.v5B43ADA051134@repo.freebsd.org>

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

Log:
  Flag loadpoolfile() (ippool -f) command line syntax errors.

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

Modified: head/contrib/ipfilter/tools/ippool.c
==============================================================================
--- head/contrib/ipfilter/tools/ippool.c	Sun Jun 11 04:00:26 2017	(r319821)
+++ head/contrib/ipfilter/tools/ippool.c	Sun Jun 11 04:03:09 2017	(r319822)
@@ -380,7 +380,13 @@ loadpoolfile(argc, argv, infile)
 		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, "loadpoolfile: opts = %#x\n", opts);



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