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

[PATCH] zlib merge: turboc

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.
parent 9f19144e
......@@ -149,15 +149,9 @@ int zlib_inflate_codes(
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
......
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