lkml.org 
[lkml]   [2003]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[Patch] 2.5.70-bk11 zlib merge #1 turboc
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/
\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.085 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site