summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/dir.c b/dir.c
index 48e93ca9e6..b26eda4c38 100644
--- a/dir.c
+++ b/dir.c
@@ -97,7 +97,6 @@ range(pat, test, flags)
char test;
int flags;
{
- char *first = pat;
int not, ok = 0;
int nocase = flags & FNM_CASEFOLD;
int escape = !(flags & FNM_NOESCAPE);
@@ -120,13 +119,13 @@ range(pat, test, flags)
pat++;
cend = pat[1];
if (!cend)
- break;
+ return 0;
pat += 2;
}
if (downcase(cstart) <= test && test <= downcase(cend))
ok = 1;
}
- return test == '[' ? first : 0;
+ return 0;
}
#define ISDIRSEP(c) (pathname && isdirsep(c))