From: Dirk Lemstra Date: Tue, 12 Sep 2017 18:32:56 +0000 (+0200) Subject: Removed check for argument that cannot be null. X-Git-Tag: 7.0.7-3~69 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8fe79381a4ccb472b977c7078749c826652e6c1d;p=imagemagick Removed check for argument that cannot be null. --- diff --git a/coders/png.c b/coders/png.c index 55ca31f38..0c47fe6d2 100644 --- a/coders/png.c +++ b/coders/png.c @@ -8128,11 +8128,8 @@ static inline MagickBooleanType Magick_png_color_equal(const Image *image, #if defined(PNG_tIME_SUPPORTED) static void write_tIME_chunk(Image *image,png_struct *ping,png_info *info, - const char *date,ExceptionInfo *exception) + const char *timestamp,ExceptionInfo *exception) { - const char - *timestamp; - int ret; @@ -8151,11 +8148,7 @@ static void write_tIME_chunk(Image *image,png_struct *ping,png_info *info, png_time ptime; - if (date == (const char *) NULL) - timestamp=GetImageProperty(image,"date:modify",exception); - else - timestamp=date; - + assert(timestamp != (const char *) NULL); LogMagickEvent(CoderEvent,GetMagickModule(), " Writing tIME chunk: timestamp property is %30s\n",timestamp); ret=sscanf(timestamp,"%d-%d-%dT%d:%d:%d",&year,&month,&day,&hour,