This is stolen from gzip-1.3 snapshot.

--
Bartlomiej Zolnierkiewicz
<[EMAIL PROTECTED]>
--- linux-240t9/lib/inflate.c   Sun Mar 26 11:56:19 2000
+++ linux/lib/inflate.c Thu Oct  5 23:22:49 2000
@@ -5,7 +5,7 @@
 
 /* 
  * Adapted for booting Linux by Hannu Savolainen 1993
- * based on gzip-1.0.3 
+ * based on gzip-1.0.3
  *
  * Nicolas Pitre <[EMAIL PROTECTED]>, 1999/04/14 :
  *   Little mods for all variable to reside either into rodata or bss segments
@@ -1038,13 +1038,13 @@
 
   for (i = 1; i < 256; i++)
   {
-    c = 0;
-    for (k = i | 256; k != 1; k >>= 1)
-    {
+    c = i;
+    /* The idea to initialize the register with the byte instead of
+     * zero was stolen from Haruhiko Okumura's ar002
+     */
+    for (k = 8; k; k--)
       c = c & 1 ? (c >> 1) ^ e : c >> 1;
-      if (k & 1)
-        c ^= e;
-    }
+
     crc_32_tab[i] = c;
   }
 
@@ -1172,5 +1172,3 @@
     }
     return 0;
 }
-
-

Reply via email to