From: Joseph Sutton Date: Mon, 7 Mar 2022 07:28:05 +0000 (+1300) Subject: compression: Remove redundant nibble_index check X-Git-Tag: talloc-2.3.4~169 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b62fbc4a535a84167ee4ddff244e66536742a618;p=thirdparty%2Fsamba.git compression: Remove redundant nibble_index check If nibble_index is non-zero, we have already written to it, and so don't need to check again that it is in bounds. Signed-off-by: Joseph Sutton Reviewed-by: Douglas Bagnall --- diff --git a/lib/compression/lzxpress.c b/lib/compression/lzxpress.c index 222a5119c9f..b7b365f165c 100644 --- a/lib/compression/lzxpress.c +++ b/lib/compression/lzxpress.c @@ -158,7 +158,6 @@ ssize_t lzxpress_compress(const uint8_t *uncompressed, compressed[nibble_index] = MIN(match_len, 15); compressed_pos += sizeof(uint8_t); } else { - __CHECK_BYTES(max_compressed_size, nibble_index, sizeof(uint8_t)); compressed[nibble_index] |= MIN(match_len, 15) << 4; nibble_index = 0; }