]> granicus.if.org Git - imagemagick/commitdiff
Removed check for argument that cannot be null.
authorDirk Lemstra <dirk@git.imagemagick.org>
Tue, 12 Sep 2017 18:32:56 +0000 (20:32 +0200)
committerDirk Lemstra <dirk@git.imagemagick.org>
Tue, 12 Sep 2017 18:33:05 +0000 (20:33 +0200)
coders/png.c

index 55ca31f386d534a528842bfca1a188c1d077615d..0c47fe6d29eb5f308c8330eaefff9f5ec992398b 100644 (file)
@@ -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,