[libpng16] Fixed a new signed-unsigned comparison in pngrtran.c (Max Stepin).

Removed some useless typecasts from contrib/tools/png-fix-itxt.c
This commit is contained in:
Glenn Randers-Pehrson
2015-07-01 14:06:39 -05:00
parent 4e5ac72254
commit a390897ba4
4 changed files with 17 additions and 13 deletions

View File

@@ -37,7 +37,7 @@
/* Read one character (inchar), also return octet (c), break if EOF */
#define GETBREAK inchar=getchar(); \
c=(inchar & 0xffU);\
if (inchar != (int) c) break
if (inchar != c) break
int
main(void)
{
@@ -54,7 +54,7 @@ main(void)
putchar(c);
}
if (inchar == (int) c) /* !EOF */
if (inchar == c) /* !EOF */
for (;;)
{
/* Read the length */
@@ -86,7 +86,7 @@ for (;;)
GETBREAK; buf[i] = c;
}
if (inchar != (int) c) /* EOF */
if (inchar != c) /* EOF */
break;
/* Calculate the CRC */
@@ -113,7 +113,7 @@ for (;;)
crc = crc32(crc, buf+7+length, 1);
}
if (inchar != (int) c) /* EOF */
if (inchar != c) /* EOF */
break;
/* Update length bytes */
@@ -129,7 +129,7 @@ for (;;)
else
{
if (inchar != (int) c) /* EOF */
if (inchar != c) /* EOF */
break;
/* Copy bytes that were already read (length and chunk name) */
@@ -143,7 +143,7 @@ for (;;)
putchar(c);
}
if (inchar != (int) c) /* EOF */
if (inchar != c) /* EOF */
{
break;
}
@@ -153,7 +153,7 @@ for (;;)
break;
}
if (inchar != (int) c) /* EOF */
if (inchar != c) /* EOF */
break;
if (buf[4] == 73 && buf[5] == 69 && buf[6] == 78 && buf[7] == 68)