svn commit: r299687 - head/usr.sbin/binmiscctl
Don Lewis
truckman at FreeBSD.org
Fri May 13 17:48:05 UTC 2016
Author: truckman
Date: Fri May 13 17:48:04 2016
New Revision: 299687
URL: https://svnweb.freebsd.org/changeset/base/299687
Log:
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
Modified:
head/usr.sbin/binmiscctl/binmiscctl.c
Modified: head/usr.sbin/binmiscctl/binmiscctl.c
==============================================================================
--- head/usr.sbin/binmiscctl/binmiscctl.c Fri May 13 17:44:20 2016 (r299686)
+++ head/usr.sbin/binmiscctl/binmiscctl.c Fri May 13 17:48:04 2016 (r299687)
@@ -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++;
More information about the svn-src-all
mailing list