aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/binmiscctl
diff options
context:
space:
mode:
authorDon Lewis <truckman@FreeBSD.org>2016-05-13 17:48:04 +0000
committerDon Lewis <truckman@FreeBSD.org>2016-05-13 17:48:04 +0000
commitfe579263e00c69c5d1a6f731992ef5a3f666862f (patch)
tree7f6b7f257c9d95606d610d6d432c155ac5cba689 /usr.sbin/binmiscctl
parent396f5ab6ee982a171b497d9c88c598c88ff2a040 (diff)
downloadsrc-fe579263e00c69c5d1a6f731992ef5a3f666862f.tar.gz
src-fe579263e00c69c5d1a6f731992ef5a3f666862f.zip
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
Notes
Notes: svn path=/head/; revision=299687
Diffstat (limited to 'usr.sbin/binmiscctl')
-rw-r--r--usr.sbin/binmiscctl/binmiscctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/binmiscctl/binmiscctl.c b/usr.sbin/binmiscctl/binmiscctl.c
index 5ab82e4cd42a..2483a8173dfc 100644
--- a/usr.sbin/binmiscctl/binmiscctl.c
+++ b/usr.sbin/binmiscctl/binmiscctl.c
@@ -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++;