Hi Linus!
As promised, the NULL casts.
Jörn
-- Beware of bugs in the above code; I have only proved it correct, but not tried it. -- Donald Knuth--- linux-2.5.70-bk11/lib/zlib_deflate/deflate.c~zlib_cleanup_casts 2003-06-06 20:14:27.000000000 +0200 +++ linux-2.5.70-bk11/lib/zlib_deflate/deflate.c 2003-06-06 20:44:51.000000000 +0200 @@ -962,7 +962,7 @@ #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; \ --- linux-2.5.70-bk11/lib/zlib_inflate/infblock.c~zlib_cleanup_casts 2003-06-06 20:14:27.000000000 +0200 +++ linux-2.5.70-bk11/lib/zlib_inflate/infblock.c 2003-06-06 20:45:51.000000000 +0200 @@ -80,7 +80,7 @@ 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( --- linux-2.5.70-bk11/lib/zlib_inflate/inftrees.c~zlib_cleanup_casts 2003-06-06 20:14:27.000000000 +0200 +++ linux-2.5.70-bk11/lib/zlib_inflate/inftrees.c 2003-06-06 20:47:11.000000000 +0200 @@ -139,7 +139,7 @@ } 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 @@ 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 @@ 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) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Jun 07 2003 - 22:00:31 EST