Fix sign comparison warning, which broke 32-bit builds. (#388)

This commit is contained in:
Ryan A. Pavlik 2022-06-20 14:01:50 -05:00 committed by GitHub
parent c7e856a2b1
commit 4e852fc0b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -318,10 +318,10 @@ lsquic_rechist_received (lsquic_rechist_t *rechist, lsquic_packno_t packno,
rechist->rh_elems[idx].re_low = packno;
rechist->rh_elems[idx].re_count = 1;
rechist->rh_elems[idx].re_next = next_idx;
if (next_idx == rechist->rh_head)
if (next_idx == (ptrdiff_t)rechist->rh_head)
rechist->rh_head = idx;
else
rechist->rh_elems[prev_idx].re_next = idx;
rechist->rh_elems[prev_idx].re_next = idx;
rechist_sanity_check(rechist);
return REC_ST_OK;