Skip to content

Commit

Permalink
lib: avoid clang static analyzer warning in deflate_get_offset_slot()
Browse files Browse the repository at this point in the history
Resolves #357
  • Loading branch information
ebiggers committed Mar 18, 2024
1 parent 1ef0db7 commit 9e79696
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/deflate_compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -1474,6 +1474,8 @@ deflate_get_offset_slot(u32 offset)
*/
unsigned n = (256 - offset) >> 29;

ASSERT(offset >= 1 && offset <= 32768);

return deflate_offset_slot[(offset - 1) >> n] + (n << 1);
}

Expand Down

0 comments on commit 9e79696

Please sign in to comment.