summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-07-06 04:13:20 +0000
committerbde <bde@FreeBSD.org>1997-07-06 04:13:20 +0000
commita7e4624113034e193e5114313082f61ac9e53dff (patch)
treefaf43d0579c7ca80f7bbc91bc9174e1c68deedc2 /usr.bin/systat
parent71773196f63219747dfc758058cf4204cd0da942 (diff)
downloadFreeBSD-src-a7e4624113034e193e5114313082f61ac9e53dff.zip
FreeBSD-src-a7e4624113034e193e5114313082f61ac9e53dff.tar.gz
Importing Lite2 broke lookup() to return -1 for the nmatches == 0 case.
Fixed.
Diffstat (limited to 'usr.bin/systat')
-rw-r--r--usr.bin/systat/cmds.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/systat/cmds.c b/usr.bin/systat/cmds.c
index e374e3f..bbdb58e 100644
--- a/usr.bin/systat/cmds.c
+++ b/usr.bin/systat/cmds.c
@@ -32,7 +32,11 @@
*/
#ifndef lint
+#if 0
static char sccsid[] = "@(#)cmds.c 8.2 (Berkeley) 4/29/95";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
#include <stdlib.h>
@@ -165,7 +169,7 @@ lookup(name)
nmatches++;
}
}
- if (nmatches != 1)
+ if (nmatches > 1)
return ((struct cmdtab *)-1);
return (found);
}
OpenPOWER on IntegriCloud