mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-01 21:33:04 +00:00
Importing Lite2 broke lookup() to return -1 for the nmatches == 0 case.
Fixed.
This commit is contained in:
parent
94143ce785
commit
237f53369c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=27231
@ -32,7 +32,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
|
#if 0
|
||||||
static char sccsid[] = "@(#)cmds.c 8.2 (Berkeley) 4/29/95";
|
static char sccsid[] = "@(#)cmds.c 8.2 (Berkeley) 4/29/95";
|
||||||
|
#endif
|
||||||
|
static const char rcsid[] =
|
||||||
|
"$Id$";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -165,7 +169,7 @@ lookup(name)
|
|||||||
nmatches++;
|
nmatches++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nmatches != 1)
|
if (nmatches > 1)
|
||||||
return ((struct cmdtab *)-1);
|
return ((struct cmdtab *)-1);
|
||||||
return (found);
|
return (found);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user