mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Reverted "& 0xff" additions of version 1.6.17beta01. Libpng passes
the Coverity scan without them.
This commit is contained in:
13
pngtrans.c
13
pngtrans.c
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user