aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJörn Engel <joern@wohnheim.fh-wedel.de>2003-06-07 19:50:44 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-06-07 19:50:44 -0700
commitd989de20684be92cd431c929a2ed5f57e7388676 (patch)
treee43a4dc291bc1e1c01fca35b6bb07400c52a8ea2 /lib
parentf7bb70ab961f046dc7ed9187545628a19537108b (diff)
downloadhistory-d989de20684be92cd431c929a2ed5f57e7388676.tar.gz
[PATCH] zlib cleanup: unnecessary cast removal
This removes unnecessary NULL casting.
Diffstat (limited to 'lib')
-rw-r--r--lib/zlib_deflate/deflate.c2
-rw-r--r--lib/zlib_inflate/infblock.c2
-rw-r--r--lib/zlib_inflate/inftrees.c9
3 files changed, 6 insertions, 7 deletions
diff --git a/lib/zlib_deflate/deflate.c b/lib/zlib_deflate/deflate.c
index 81ef53387cdeb6..8db61c40dd8162 100644
--- a/lib/zlib_deflate/deflate.c
+++ b/lib/zlib_deflate/deflate.c
@@ -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; \
diff --git a/lib/zlib_inflate/infblock.c b/lib/zlib_inflate/infblock.c
index cad8eb5aea3931..7bb7db5cd3a078 100644
--- a/lib/zlib_inflate/infblock.c
+++ b/lib/zlib_inflate/infblock.c
@@ -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(
diff --git a/lib/zlib_inflate/inftrees.c b/lib/zlib_inflate/inftrees.c
index 752da2e672a942..13752e4cb49230 100644
--- a/lib/zlib_inflate/inftrees.c
+++ b/lib/zlib_inflate/inftrees.c
@@ -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)