[libpng16] Reverted "& 0xff" additions of version 1.6.17beta01. Libpng passes

the Coverity scan without them.
This commit is contained in:
Glenn Randers-Pehrson
2015-03-21 11:54:32 -05:00
parent 2b66107abb
commit c5370ede95
13 changed files with 238 additions and 249 deletions

View File

@@ -273,7 +273,7 @@ png_do_invert(png_row_infop row_info, png_bytep row)
for (i = 0; i < istop; i++)
{
*rp = (png_byte)((~(*rp)) & 0xff);
*rp = (png_byte)(~(*rp));
rp++;
}
}
@@ -287,7 +287,7 @@ png_do_invert(png_row_infop row_info, png_bytep row)
for (i = 0; i < istop; i += 2)
{
*rp = (png_byte)((~(*rp)) & 0xff);
*rp = (png_byte)(~(*rp));
rp += 2;
}
}
@@ -302,8 +302,8 @@ png_do_invert(png_row_infop row_info, png_bytep row)
for (i = 0; i < istop; i += 4)
{
*rp = (png_byte)((~(*rp)) & 0xff);
*(rp + 1) = (png_byte)((~(*(rp + 1))) & 0xff);
*rp = (png_byte)(~(*rp));
*(rp + 1) = (png_byte)(~(*(rp + 1)));
rp += 4;
}
}
@@ -803,9 +803,8 @@ png_set_user_transform_info(png_structrp png_ptr, png_voidp
#endif
png_ptr->user_transform_ptr = user_transform_ptr;
png_ptr->user_transform_depth = (png_byte)(user_transform_depth & 0xff);
png_ptr->user_transform_channels =
(png_byte)(user_transform_channels & 0xff);
png_ptr->user_transform_depth = (png_byte)user_transform_depth;
png_ptr->user_transform_channels = (png_byte)user_transform_channels;
}
#endif