summaryrefslogtreecommitdiff
path: root/deflate_slow.c
diff options
context:
space:
mode:
authorNathan Moinvaziri <nathan@nathanm.com>2020-09-20 10:51:05 -0700
committerHans Kristian Rosbach <hk-github@circlestorm.org>2020-09-23 17:00:11 +0200
commit1c58894c679f8d4e930715bc3b670481c0854431 (patch)
tree21ff8f232b052e9676013c96bc16ab4b7636415b /deflate_slow.c
parent736765fd8aad92e5a219882fb240d2b51a6adeaa (diff)
Remove NIL preprocessor macro which isn't consistently enforced.
Diffstat (limited to 'deflate_slow.c')
-rw-r--r--deflate_slow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/deflate_slow.c b/deflate_slow.c
index af2f284..ea5eed8 100644
--- a/deflate_slow.c
+++ b/deflate_slow.c
@@ -38,7 +38,7 @@ Z_INTERNAL block_state deflate_slow(deflate_state *s, int flush) {
/* Insert the string window[strstart .. strstart+2] in the
* dictionary, and set hash_head to the head of the hash chain:
*/
- hash_head = NIL;
+ hash_head = 0;
if (LIKELY(s->lookahead >= MIN_MATCH)) {
hash_head = functable.quick_insert_string(s, s->strstart);
}
@@ -48,7 +48,7 @@ Z_INTERNAL block_state deflate_slow(deflate_state *s, int flush) {
s->prev_match = (Pos)s->match_start;
match_len = MIN_MATCH-1;
- if (hash_head != NIL && s->prev_length < s->max_lazy_match && s->strstart - hash_head <= MAX_DIST(s)) {
+ if (hash_head != 0 && s->prev_length < s->max_lazy_match && s->strstart - hash_head <= MAX_DIST(s)) {
/* To simplify the code, we prevent matches with the string
* of window index 0 (in particular we have to avoid a match
* of the string with itself at the start of the input file).