]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 8 Jan 2012 21:52:15 +0000 (21:52 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 8 Jan 2012 21:52:15 +0000 (21:52 +0000)
MagickCore/attribute.c

index da50c4baa19864495174749b0bb336f68945c9f3..0c71ee840a19b5309b6cdcc75ac5d3d55ee5c0d3 100644 (file)
@@ -364,7 +364,7 @@ MagickExport size_t GetImageDepth(const Image *image,ExceptionInfo *exception)
       ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
     for (i=0; i <= (ssize_t) MaxMap; i++)
     {
-      size_t
+      unsigned int
         depth;
 
       for (depth=1; depth < MAGICKCORE_QUANTUM_DEPTH; depth++)
@@ -479,15 +479,11 @@ MagickExport size_t GetImageDepth(const Image *image,ExceptionInfo *exception)
           continue;
         while (current_depth[id] < MAGICKCORE_QUANTUM_DEPTH)
         {
-          MagickStatusType
-            status;
-
           QuantumAny
             range;
 
           range=GetQuantumRange(current_depth[id]);
-          status=p[i] != ScaleAnyToQuantum(ScaleQuantumToAny(p[i],range),range);
-          if (status == 0)
+          if (p[i] == ScaleAnyToQuantum(ScaleQuantumToAny(p[i],range),range))
             break;
           current_depth[id]++;
         }