diff options
Diffstat (limited to 'inftrees.c')
| -rw-r--r-- | inftrees.c | 10 |
1 files changed, 4 insertions, 6 deletions
| @@ -57,9 +57,9 @@ int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, | |||
| 57 | unsigned mask; /* mask for low root bits */ | 57 | unsigned mask; /* mask for low root bits */ |
| 58 | code here; /* table entry for duplication */ | 58 | code here; /* table entry for duplication */ |
| 59 | code FAR *next; /* next available space in table */ | 59 | code FAR *next; /* next available space in table */ |
| 60 | const unsigned short FAR *base; /* base value table to use */ | 60 | const unsigned short FAR *base = NULL; /* base value table to use */ |
| 61 | const unsigned short FAR *extra; /* extra bits table to use */ | 61 | const unsigned short FAR *extra = NULL; /* extra bits table to use */ |
| 62 | unsigned match; /* use base and extra for symbol >= match */ | 62 | unsigned match = 0; /* use base and extra for symbol >= match */ |
| 63 | unsigned short count[MAXBITS+1]; /* number of codes of each length */ | 63 | unsigned short count[MAXBITS+1]; /* number of codes of each length */ |
| 64 | unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ | 64 | unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ |
| 65 | static const unsigned short lbase[31] = { /* Length codes 257..285 base */ | 65 | static const unsigned short lbase[31] = { /* Length codes 257..285 base */ |
| @@ -185,7 +185,6 @@ int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, | |||
| 185 | /* set up for code type */ | 185 | /* set up for code type */ |
| 186 | switch (type) { | 186 | switch (type) { |
| 187 | case CODES: | 187 | case CODES: |
| 188 | base = extra = work; /* dummy value--not used */ | ||
| 189 | match = 20; | 188 | match = 20; |
| 190 | break; | 189 | break; |
| 191 | case LENS: | 190 | case LENS: |
| @@ -193,10 +192,9 @@ int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, | |||
| 193 | extra = lext; | 192 | extra = lext; |
| 194 | match = 257; | 193 | match = 257; |
| 195 | break; | 194 | break; |
| 196 | default: /* DISTS */ | 195 | case DISTS: |
| 197 | base = dbase; | 196 | base = dbase; |
| 198 | extra = dext; | 197 | extra = dext; |
| 199 | match = 0; | ||
| 200 | } | 198 | } |
| 201 | 199 | ||
| 202 | /* initialize state for loop */ | 200 | /* initialize state for loop */ |
