]> granicus.if.org Git - imagemagick/commitdiff
coders/xpm.c: remove unused check
authorIlya Shipitsin <chipitsine@gmail.com>
Fri, 14 Sep 2018 16:20:54 +0000 (21:20 +0500)
committerDirk Lemstra <dirk@git.imagemagick.org>
Fri, 14 Sep 2018 18:37:39 +0000 (20:37 +0200)
found by coverity

there's already check against NULL in line 382

coders/xpm.c

index c61a68c243b78a0d54d0c1ff2bff27e10316b253..05395996ed7db4d1abf7a924a6a2c5a275f17967 100644 (file)
@@ -398,11 +398,8 @@ static Image *ReadXPMImage(const ImageInfo *image_info,ExceptionInfo *exception)
           q++;
         if ((next-q) < 0)
           break;
-        if (next != (char *) NULL)
-          (void) CopyXPMColor(target,q,MagickMin((size_t) (next-q),
+        (void) CopyXPMColor(target,q,MagickMin((size_t) (next-q),
             MagickPathExtent-1));
-        else
-          (void) CopyMagickString(target,q,MagickPathExtent);
         q=ParseXPMColor(target,MagickFalse);
         if (q != (char *) NULL)
           *q='\0';