about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
Diffstat (limited to 'posix')
-rw-r--r--posix/fnmatch_loop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c
index b7baa7be24..38cb8f1d76 100644
--- a/posix/fnmatch_loop.c
+++ b/posix/fnmatch_loop.c
@@ -415,10 +415,11 @@ FCT (pattern, string, no_leading_period, flags)
 		  return FNM_NOMATCH;
 		else
 		  {
-		    int is_seqval = 0;
 		    int is_range = 0;
 
 #ifdef _LIBC
+		    int is_seqval = 0;
+
 		    if (c == L('[') && *p == L('.'))
 		      {
 			uint32_t nrules =
@@ -850,7 +851,7 @@ FCT (pattern, string, no_leading_period, flags)
 			  return FNM_NOMATCH;
 
 			/* It is a range.  */
-			if (cold <= fc && fc <= c)
+			if (cold <= fn && fn <= c)
 			  goto matched;
 #endif