svn commit: r350555 - head/sbin/nvmecontrol

Alexander Motin mav at FreeBSD.org
Sat Aug 3 04:30:23 UTC 2019


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);


More information about the svn-src-head mailing list