]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 11 Nov 2012 17:12:12 +0000 (17:12 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 11 Nov 2012 17:12:12 +0000 (17:12 +0000)
MagickCore/token.c

index c32ec63685b2c0b22d9b722ab2209bef70a2b1a3..0a76da632e269b30cebb793b95e41766113b30be 100644 (file)
@@ -594,16 +594,31 @@ MagickExport MagickBooleanType GlobExpression(const char *expression,
 MagickPrivate MagickBooleanType IsGlob(const char *path)
 {
   MagickBooleanType
-    status;
+    status = MagickFalse;
+
+  register const char
+    *p;
 
   if (IsPathAccessible(path) != MagickFalse)
     return(MagickFalse);
-  status=(strchr(path,'*') != (char *) NULL) ||
-    (strchr(path,'?') != (char *) NULL) ||
-    (strchr(path,'{') != (char *) NULL) ||
-    (strchr(path,'}') != (char *) NULL) ||
-    (strchr(path,'[') != (char *) NULL) ||
-    (strchr(path,']') != (char *) NULL) ? MagickTrue : MagickFalse;
+  for (p=path; *p != '\0'; p++)
+  {
+    switch (*p)
+    {
+      case '*':
+      case '?':
+      case '{':
+      case '}':
+      case '[':
+      case ']':
+      {
+        status=MagickTrue;
+        break;
+      }
+      default:
+        break;
+    }
+  }
   return(status);
 }
 \f