From 237f53369cb392d54286df13d43bd2a20c1fab55 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 6 Jul 1997 04:13:20 +0000 Subject: [PATCH] Importing Lite2 broke lookup() to return -1 for the nmatches == 0 case. Fixed. --- usr.bin/systat/cmds.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.bin/systat/cmds.c b/usr.bin/systat/cmds.c index e374e3f6f215..bbdb58e6a83d 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 @@ -165,7 +169,7 @@ lookup(name) nmatches++; } } - if (nmatches != 1) + if (nmatches > 1) return ((struct cmdtab *)-1); return (found); }