svn commit: r350950 - stable/12/sbin/nvmecontrol

Alexander Motin mav at FreeBSD.org
Mon Aug 12 19:42:44 UTC 2019


Author: mav
Date: Mon Aug 12 19:42:43 2019
New Revision: 350950
URL: https://svnweb.freebsd.org/changeset/base/350950

Log:
  MFC r350555: Fix parameter check broken at r350057.

Modified:
  stable/12/sbin/nvmecontrol/format.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sbin/nvmecontrol/format.c
==============================================================================
--- stable/12/sbin/nvmecontrol/format.c	Mon Aug 12 19:42:07 2019	(r350949)
+++ stable/12/sbin/nvmecontrol/format.c	Mon Aug 12 19:42:43 2019	(r350950)
@@ -124,7 +124,7 @@ format(const struct cmd *f, int argc, char *argv[])
 	if (arg_parse(argc, argv, f))
 		return;
 
-	if (opt.Eflag || opt.Cflag || opt.ses != SES_NONE) {
+	if ((int)opt.Eflag + opt.Cflag + (opt.ses != SES_NONE) > 1) {
 		fprintf(stderr,
 		    "Only one of -E, -C or -s may be specified\n");
 		arg_help(argc, argv, f);


More information about the svn-src-stable mailing list