diff options
Diffstat (limited to 'sys/libkern')
-rw-r--r-- | sys/libkern/fnmatch.c | 4 | ||||
-rw-r--r-- | sys/libkern/strsep.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/libkern/fnmatch.c b/sys/libkern/fnmatch.c index dc7f151..0c2ca13 100644 --- a/sys/libkern/fnmatch.c +++ b/sys/libkern/fnmatch.c @@ -149,13 +149,13 @@ rangematch(pattern, test, flags) */ if (negate = (*pattern == '!' || *pattern == '^')) ++pattern; - + for (ok = 0; (c = *pattern++) != ']';) { if (c == '\\' && !(flags & FNM_NOESCAPE)) c = *pattern++; if (c == EOS) return (NULL); - if (*pattern == '-' + if (*pattern == '-' && (c2 = *(pattern+1)) != EOS && c2 != ']') { pattern += 2; if (c2 == '\\' && !(flags & FNM_NOESCAPE)) diff --git a/sys/libkern/strsep.c b/sys/libkern/strsep.c index 18dc398..ddad596 100644 --- a/sys/libkern/strsep.c +++ b/sys/libkern/strsep.c @@ -41,7 +41,7 @@ static char sccsid[] = "@(#)strsep.c 8.1 (Berkeley) 6/4/93"; /* * Get next token from string *stringp, where tokens are possibly-empty - * strings separated by characters from delim. + * strings separated by characters from delim. * * Writes NULs into the string at *stringp to end tokens. * delim need not remain constant from call to call. |