Fix parameter check broken at r350057.

MFC after:	2 weeks
This commit is contained in:
Alexander Motin 2019-08-03 04:30:22 +00:00
parent 1dbf944a91
commit ea44065c1f

View File

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