]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 28 Mar 2014 10:33:33 +0000 (10:33 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 28 Mar 2014 10:33:33 +0000 (10:33 +0000)
MagickCore/resource.c

index c61db77c350ab04f4e76361a6816a9b8c7a2682e..ff8bf6fa3012f38bf261ba7f815c4e412db19c0a 100644 (file)
@@ -357,7 +357,6 @@ MagickExport MagickBooleanType GetPathTemplate(char *path)
 {
   char
     *directory,
-    *p,
     *value;
 
   ExceptionInfo
@@ -420,13 +419,18 @@ MagickExport MagickBooleanType GetPathTemplate(char *path)
       (double) getpid());
   directory=DestroyString(directory);
 #if defined(MAGICKCORE_WINDOWS_SUPPORT)
-  /*
-    Ghostscript does not like backslashes so we need to replace them. The
-    forward slash also works under Windows.
-  */
-  for (p=(path[1] == *DirectorySeparator ? path+2 : path); *p != '\0'; p++)
-    if (*p == *DirectorySeparator)
-      *p='/';
+  {
+    register char
+      *p;
+
+    /*
+      Ghostscript does not like backslashes so we need to replace them. The
+      forward slash also works under Windows.
+    */
+    for (p=(path[1] == *DirectorySeparator ? path+2 : path); *p != '\0'; p++)
+      if (*p == *DirectorySeparator)
+        *p='/';
+  }
 #endif
   return(MagickTrue);
 }