Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5676
b: refs/heads/master
c: 4aad724
h: refs/heads/master
v: v3
  • Loading branch information
Tim Yamin authored and Linus Torvalds committed Aug 5, 2005
1 parent 746a321 commit fb0b09b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 00a5dfdb93f74e4d95fb0d83c890728e331f8810
refs/heads/master: 4aad724d3e52238e1ce005f166fbba5b4072a7f6
3 changes: 2 additions & 1 deletion trunk/arch/ppc64/boot/zlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ local int huft_build(
{
*t = (inflate_huft *)Z_NULL;
*m = 0;
return Z_OK;
return Z_DATA_ERROR;
}


Expand Down Expand Up @@ -1351,6 +1351,7 @@ local int huft_build(
if ((j = *p++) != 0)
v[x[j]++] = i;
} while (++i < n);
n = x[g]; /* set n to length of v */


/* Generate the Huffman codes and for each, make the table entries */
Expand Down
16 changes: 9 additions & 7 deletions trunk/lib/inflate.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ DEBG("huft1 ");
{
*t = (struct huft *)NULL;
*m = 0;
return 0;
return 2;
}

DEBG("huft2 ");
Expand Down Expand Up @@ -374,6 +374,7 @@ DEBG("huft5 ");
if ((j = *p++) != 0)
v[x[j]++] = i;
} while (++i < n);
n = x[g]; /* set n to length of v */

DEBG("h6 ");

Expand Down Expand Up @@ -410,12 +411,13 @@ DEBG1("1 ");
DEBG1("2 ");
f -= a + 1; /* deduct codes from patterns left */
xp = c + k;
while (++j < z) /* try smaller tables up to z bits */
{
if ((f <<= 1) <= *++xp)
break; /* enough codes to use up j bits */
f -= *xp; /* else deduct codes from patterns */
}
if (j < z)
while (++j < z) /* try smaller tables up to z bits */
{
if ((f <<= 1) <= *++xp)
break; /* enough codes to use up j bits */
f -= *xp; /* else deduct codes from patterns */
}
}
DEBG1("3 ");
z = 1 << j; /* table entries for j-bit table */
Expand Down
2 changes: 1 addition & 1 deletion trunk/lib/zlib_inflate/inftrees.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static int huft_build(
{
*t = NULL;
*m = 0;
return Z_OK;
return Z_DATA_ERROR;
}


Expand Down

0 comments on commit fb0b09b

Please sign in to comment.