Another attempt at resolving CID 1305629. The test of cmd == -1

may make Coverity think that other negative values of cmd (used
as an index) are possible.  Testing < 0 is a more common idiom
in any case.

Reported by:	Coverity
CID:		1305629
This commit is contained in:
truckman 2016-05-13 17:48:04 +00:00
parent ec7afdf646
commit a0059a24e3

View File

@ -416,7 +416,7 @@ main(int argc, char **argv)
argc--, argv++;
cmd = demux_cmd(argc, argv);
if (cmd == -1)
if (cmd < 0)
usage("Error: Unknown command \"%s\"", argv[0]);
argc--, argv++;