[libpng17] Changed "if (!x)" to "if (x == 0)" and "if (x)" to "if (x !== 0)"

This commit is contained in:
Glenn Randers-Pehrson
2014-10-25 19:30:02 -05:00
parent fd409c8019
commit 515659d638
6 changed files with 25 additions and 18 deletions

7
png.c
View File

@@ -696,13 +696,13 @@ png_get_copyright(png_const_structrp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.7.0beta39 - October 17, 2014" PNG_STRING_NEWLINE \
"libpng version 1.7.0beta39 - October 26, 2014" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2014 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
return "libpng version 1.7.0beta39 - October 17, 2014\
return "libpng version 1.7.0beta39 - October 26, 2014\
Copyright (c) 1998-2014 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@@ -3180,7 +3180,8 @@ png_muldiv(png_fixed_point_p res, png_fixed_point a, png_int_32 times,
result = -result;
/* Check for overflow. */
if ((negative && result <= 0) || (!negative && result >= 0))
if ((negative != 0 && result <= 0) ||
(negative == 0 && result >= 0))
{
*res = result;
return 1;