From 639b48625f485ebea89758700675473e56d5fe1d Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Fri, 15 Jul 2016 17:22:10 -0500 Subject: [PATCH] [libpng16] Eliminated unnecessary tests of boolean png_isaligned() vs 0. --- ANNOUNCE | 1 + CHANGES | 1 + pngrutil.c | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index ea4e8398e..0d09b99c9 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -88,6 +88,7 @@ Version 1.6.24beta05 [July 13, 2016] Version 1.6.24beta06 [July 15, 2016] Fixed more indentation to comply with our coding style. + Eliminated unnecessary tests of boolean png_isaligned() vs 0. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 09b5efa67..0f68bda61 100644 --- a/CHANGES +++ b/CHANGES @@ -5659,6 +5659,7 @@ Version 1.6.24beta05 [July 13, 2016] Version 1.6.24beta06 [July 15, 2016] Fixed more indentation to comply with our coding style. + Eliminated unnecessary tests of boolean png_isaligned() vs 0. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngrutil.c b/pngrutil.c index ad3e101be..342da3fa5 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -3418,8 +3418,8 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display) /* Everything is aligned for png_uint_16 copies, but try for * png_uint_32 first. */ - if (png_isaligned(dp, png_uint_32) != 0 && - png_isaligned(sp, png_uint_32) != 0 && + if (png_isaligned(dp, png_uint_32) && + png_isaligned(sp, png_uint_32) && bytes_to_copy % (sizeof (png_uint_32)) == 0 && bytes_to_jump % (sizeof (png_uint_32)) == 0) {