From 1a9b0aaaf74e51d79752020880a0f108f1cb780e Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Fri, 14 Sep 2018 21:20:54 +0500 Subject: [PATCH] coders/xpm.c: remove unused check found by coverity there's already check against NULL in line 382 --- coders/xpm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/coders/xpm.c b/coders/xpm.c index c61a68c24..05395996e 100644 --- a/coders/xpm.c +++ b/coders/xpm.c @@ -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'; -- 2.40.0