Don't check for failure condition that can no longer occur

This commit is contained in:
Con Kolivas 2015-03-09 21:10:48 +11:00
parent 420a483a30
commit edc7f5a7ce

7
rzip.c
View file

@ -657,11 +657,8 @@ static inline bool hash_search(rzip_control *control, struct rzip_state *st,
current.p = p; current.p = p;
current.ofs = 0; current.ofs = 0;
if (likely(end > 0)) { if (likely(end > 0))
t = control->full_tag(control, st, p); t = control->full_tag(control, st, p);
if (unlikely(t == -1))
return false;
}
while (p < end) { while (p < end) {
i64 reverse, mlen, offset; i64 reverse, mlen, offset;
@ -724,8 +721,6 @@ static inline bool hash_search(rzip_control *control, struct rzip_state *st,
current.p = p = st->last_match; current.p = p = st->last_match;
current.len = 0; current.len = 0;
t = control->full_tag(control, st, p); t = control->full_tag(control, st, p);
if (unlikely(t == -1))
return false;
} }
if (p > cksum_limit) { if (p > cksum_limit) {