From 77ffc8bf3fec9e5b0e5d34b765b2285d4cda2090 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 18 Dec 2003 07:38:48 +0000 Subject: * dir.c (fnmatch): unlike find_dirsep(), rb_path_next() never return NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- dir.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'dir.c') diff --git a/dir.c b/dir.c index 857244180b..73c6238c7d 100644 --- a/dir.c +++ b/dir.c @@ -90,7 +90,6 @@ char *strchr _((char*,char)); #else #define isdirsep(c) ((c) == '/') #endif -#define find_dirsep(s) rb_path_next(s) static char * range(pat, test, flags) @@ -161,14 +160,14 @@ fnmatch(pat, string, flags) return FNM_NOMATCH; if (!c) { - if (pathname && find_dirsep(s)) + if (pathname && *rb_path_next(s)) return FNM_NOMATCH; else return 0; } else if (ISDIRSEP(c)) { - s = find_dirsep(s); - if (s) { + s = rb_path_next(s); + if (*s) { s++; break; } -- cgit v1.2.3