summaryrefslogtreecommitdiff
path: root/pngerror.c
diff options
context:
space:
mode:
Diffstat (limited to 'pngerror.c')
-rw-r--r--pngerror.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/pngerror.c b/pngerror.c
index 5876b477c..03dcd7c2f 100644
--- a/pngerror.c
+++ b/pngerror.c
@@ -1,7 +1,7 @@
/* pngerror.c - stub functions for i/o and memory allocation
*
- * Last changed in libpng 1.6.10 [March 6, 2014]
+ * Last changed in libpng 1.6.11 [June 5, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -195,7 +195,7 @@ png_format_number(png_const_charp start, png_charp end, int format,
* drop the decimal point. If the number is a true zero handle that
* here.
*/
- if (output)
+ if (output != 0)
*--end = '.';
else if (number == 0) /* and !output */
*--end = '0';
@@ -759,6 +759,9 @@ png_longjmp,(png_const_structrp png_ptr, int val),PNG_NORETURN)
#ifdef PNG_SETJMP_SUPPORTED
if (png_ptr && png_ptr->longjmp_fn && png_ptr->jmp_buf_ptr)
png_ptr->longjmp_fn(*png_ptr->jmp_buf_ptr, val);
+#else
+ PNG_UNUSED(png_ptr)
+ PNG_UNUSED(val)
#endif
/* If control reaches this point, png_longjmp() must not return. The only
@@ -939,7 +942,7 @@ png_safe_execute(png_imagep image_in, int (*function)(png_voidp), png_voidp arg)
saved_error_buf = image->opaque->error_buf;
result = setjmp(safe_jmpbuf) == 0;
- if (result)
+ if (result != 0)
{
image->opaque->error_buf = safe_jmpbuf;
@@ -949,7 +952,7 @@ png_safe_execute(png_imagep image_in, int (*function)(png_voidp), png_voidp arg)
image->opaque->error_buf = saved_error_buf;
/* And do the cleanup prior to any failure return. */
- if (!result)
+ if (result == 0)
png_image_free(image);
return result;