Commit d989de20 authored by Jörn Engel's avatar Jörn Engel Committed by Linus Torvalds

[PATCH] zlib cleanup: unnecessary cast removal

This removes unnecessary NULL casting.
parent f7bb70ab
......@@ -968,7 +968,7 @@ static void fill_window(s)
#define FLUSH_BLOCK_ONLY(s, eof) { \
zlib_tr_flush_block(s, (s->block_start >= 0L ? \
(char *)&s->window[(unsigned)s->block_start] : \
(char *)NULL), \
NULL), \
(ulg)((long)s->strstart - s->block_start), \
(eof)); \
s->block_start = s->strstart; \
......
......@@ -80,7 +80,7 @@ void zlib_inflate_blocks_reset(
s->bitb = 0;
s->read = s->write = s->window;
if (s->checkfn != NULL)
z->adler = s->check = (*s->checkfn)(0L, (const Byte *)NULL, 0);
z->adler = s->check = (*s->checkfn)(0L, NULL, 0);
}
inflate_blocks_statef *zlib_inflate_blocks_new(
......
......@@ -139,7 +139,7 @@ static int huft_build(
} while (--i);
if (c[0] == n) /* null input--all zero length codes */
{
*t = (inflate_huft *)NULL;
*t = NULL;
*m = 0;
return Z_OK;
}
......@@ -193,8 +193,8 @@ static int huft_build(
p = v; /* grab values in bit order */
h = -1; /* no tables yet--level -1 */
w = -l; /* bits decoded == (l * h) */
u[0] = (inflate_huft *)NULL; /* just to keep compilers happy */
q = (inflate_huft *)NULL; /* ditto */
u[0] = NULL; /* just to keep compilers happy */
q = NULL; /* ditto */
z = 0; /* ditto */
/* go through the bit lengths (k already is bits in shortest code) */
......@@ -302,8 +302,7 @@ int zlib_inflate_trees_bits(
uInt *v; /* work area for huft_build */
v = WS(z)->tree_work_area_1;
r = huft_build(c, 19, 19, (uInt*)NULL, (uInt*)NULL,
tb, bb, hp, &hn, v);
r = huft_build(c, 19, 19, NULL, NULL, tb, bb, hp, &hn, v);
if (r == Z_DATA_ERROR)
z->msg = (char*)"oversubscribed dynamic bit lengths tree";
else if (r == Z_BUF_ERROR || *bb == 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment