Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Aug 2019 04:30:23 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r350555 - head/sbin/nvmecontrol
Message-ID:  <201908030430.x734UNLp098317@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sat Aug  3 04:30:22 2019
New Revision: 350555
URL: https://svnweb.freebsd.org/changeset/base/350555

Log:
  Fix parameter check broken at r350057.
  
  MFC after:	2 weeks

Modified:
  head/sbin/nvmecontrol/format.c

Modified: head/sbin/nvmecontrol/format.c
==============================================================================
--- head/sbin/nvmecontrol/format.c	Sat Aug  3 03:36:18 2019	(r350554)
+++ head/sbin/nvmecontrol/format.c	Sat Aug  3 04:30:22 2019	(r350555)
@@ -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);



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