Skip to content

Commit

Permalink
removed unnused macro
Browse files Browse the repository at this point in the history
  • Loading branch information
vurtun committed Dec 23, 2020
1 parent b9918a8 commit 7f22cca
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions sdefl.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ extern int zsdeflate(struct sdefl *s, void *o, const void *i, int n, int lvl);
#define SDEFL_EOB (256)

#define sdefl_npow2(n) (1 << (sdefl_ilog2((n)-1) + 1))
#define sdefl_blk_end(dst, s) \
sdefl_put(dst, s, (int)(s)->cod.word.lit[SDEFL_EOB], (s)->cod.len.lit[SDEFL_EOB])

static int
sdefl_ilog2(int n) {
Expand Down Expand Up @@ -579,7 +577,7 @@ sdefl_compr(struct sdefl *s, unsigned char *out, const unsigned char *in,
s->freq.lit[in[i]]++;
litlen++;
}
while (run-- != 0) {
while (run-- > 0) {
unsigned h = sdefl_hash32(&in[i]);
s->prv[i&SDEFL_WIN_MSK] = s->tbl[h];
s->tbl[h] = i, i += inc;
Expand All @@ -592,9 +590,8 @@ sdefl_compr(struct sdefl *s, unsigned char *out, const unsigned char *in,
sdefl_flush(&q, s, blk_end == in_len, in);
} while (i < in_len);

if (s->cnt) {
if (s->cnt)
sdefl_put(&q, s, 0x00, 8 - s->cnt);
}
return (int)(q - out);
}
extern int
Expand Down

0 comments on commit 7f22cca

Please sign in to comment.