[Patch] 2.5.70-bk11 zlib merge #1 turboc

Jörn Engel (joern@wohnheim.fh-wedel.de)
Fri, 6 Jun 2003 21:23:25 +0200


Hi Linus!

This is the first bit of the missing merge towards 1.1.4. Applies on
top of the previous cleanups.

This one rips out an ugly #ifdef and seems to catch a theoretical
error possibility. Always thought that they fixed more than they
officially admitted.

Jörn

-- 
A victorious army first wins and then seeks battle.
-- Sun Tzu

--- linux-2.5.70-bk11/lib/zlib_inflate/infcodes.c~zlib_merge_turboc 2003-06-06 15:56:15.000000000 +0200 +++ linux-2.5.70-bk11/lib/zlib_inflate/infcodes.c 2003-06-06 21:18:16.000000000 +0200 @@ -149,15 +149,9 @@ DUMPBITS(j) c->mode = COPY; case COPY: /* o: copying bytes in window, waiting for space */ -#ifndef __TURBOC__ /* Turbo C bug for following expression */ - f = (uInt)(q - s->window) < c->sub.copy.dist ? - s->end - (c->sub.copy.dist - (q - s->window)) : - q - c->sub.copy.dist; -#else f = q - c->sub.copy.dist; - if ((uInt)(q - s->window) < c->sub.copy.dist) - f = s->end - (c->sub.copy.dist - (uInt)(q - s->window)); -#endif + while (f < s->window) /* modulo window size-"while" instead */ + f += s->end - s->window; /* of "if" handles invalid distances */ while (c->len) { NEEDOUT - 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/