[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

View File

@@ -2632,10 +2632,10 @@ png_handle_iTXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
*/
++prefix_length;
if (!compressed && prefix_length <= length)
if (compressed == 0 && prefix_length <= length)
uncompressed_length = length - prefix_length;
else if (compressed && prefix_length < length)
else if (compressed != 0 && prefix_length < length)
{
uncompressed_length = PNG_SIZE_MAX;
@@ -2928,7 +2928,7 @@ png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr,
#endif /* !PNG_READ_UNKNOWN_CHUNKS_SUPPORTED */
/* Check for unhandled critical chunks */
if (!handled && PNG_CHUNK_CRITICAL(png_ptr->chunk_name))
if (handled == 0 && PNG_CHUNK_CRITICAL(png_ptr->chunk_name))
png_chunk_error(png_ptr, "unhandled critical chunk");
}