]> granicus.if.org Git - imagemagick/commitdiff
MagickCore/annotate.c: remove unneeded check
authorIlya Shipitsin <chipitsine@gmail.com>
Wed, 12 Sep 2018 07:53:01 +0000 (12:53 +0500)
committerDirk Lemstra <dirk@git.imagemagick.org>
Wed, 12 Sep 2018 11:32:04 +0000 (13:32 +0200)
line 631:

if ((width <= image->columns) || (s == (char *) NULL))

so, "s" cannot be NULL

MagickCore/annotate.c

index 9e203b192ee2e673f713c37244ac1b199b160ab4..df08da93f40993c9d01962573173fd5db24dc81e 100644 (file)
@@ -630,7 +630,7 @@ MagickExport ssize_t FormatMagickCaption(Image *image,DrawInfo *draw_info,
     width=(size_t) floor(metrics->width+draw_info->stroke_width+0.5);
     if ((width <= image->columns) || (s == (char *) NULL))
       continue;
-    if ((s != (char *) NULL) && (GetUTFOctets(s) == 1))
+    if (GetUTFOctets(s) == 1)
       {
         *s='\n';
         p=s;