PR bin/31068: whatis doesn't find /bin/[ by Zafer Aydogan.
Patch provided by Jukka Salmi. I just added a comment.
This commit is contained in:
parent
8d7141beec
commit
e606ac2d9a
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: whatis.c,v 1.19 2004/11/05 19:54:47 dsl Exp $ */
|
||||
/* $NetBSD: whatis.c,v 1.20 2005/08/25 16:29:15 rpaulo Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1987, 1993
|
||||
@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)whatis.c 8.5 (Berkeley) 1/2/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: whatis.c,v 1.19 2004/11/05 19:54:47 dsl Exp $");
|
||||
__RCSID("$NetBSD: whatis.c,v 1.20 2005/08/25 16:29:15 rpaulo Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -201,7 +201,10 @@ match(bp, str)
|
||||
if (!*str || !*bp)
|
||||
return(0);
|
||||
for (len = strlen(str);;) {
|
||||
for (; *bp && !isalnum((unsigned char)*bp); ++bp);
|
||||
/*
|
||||
* /bin/[ is a special case.
|
||||
*/
|
||||
for (; *bp && *bp != '[' && !isalnum((unsigned char)*bp); ++bp);
|
||||
if (!*bp)
|
||||
break;
|
||||
for (start = bp++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user