diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2021-05-03 14:57:27 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-05-03 14:58:32 +0200 |
commit | 147ac93a065e215545488337efbaa6dceebc04d0 (patch) | |
tree | f1048d0a23cf41f5fadca871f536737d51072cbd /archival/libarchive | |
parent | 74e1f321c147753573e4b6bcd34e98708b5ece52 (diff) | |
download | busybox-w32-147ac93a065e215545488337efbaa6dceebc04d0.tar.gz busybox-w32-147ac93a065e215545488337efbaa6dceebc04d0.tar.bz2 busybox-w32-147ac93a065e215545488337efbaa6dceebc04d0.zip |
decompress_gunzip: simplify ERR_RET bit clearing
My gcc is in fact clever enough to do it itself, but let's be explicit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/libarchive')
-rw-r--r-- | archival/libarchive/decompress_gunzip.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c index e93cd5005..d051ecb81 100644 --- a/archival/libarchive/decompress_gunzip.c +++ b/archival/libarchive/decompress_gunzip.c | |||
@@ -230,9 +230,8 @@ static void huft_free(huft_t *p) | |||
230 | * If 'p' has the error bit set we have to clear it, otherwise we might run | 230 | * If 'p' has the error bit set we have to clear it, otherwise we might run |
231 | * into a segmentation fault or an invalid pointer to free(p) | 231 | * into a segmentation fault or an invalid pointer to free(p) |
232 | */ | 232 | */ |
233 | if (BAD_HUFT(p)) { | 233 | //if (BAD_HUFT(p)) // commented out, since bit clearing has effect only if condition is true |
234 | p = (huft_t*)((uintptr_t)(p) ^ (uintptr_t)(ERR_RET)); | 234 | p = (huft_t*)((uintptr_t)p & ~(uintptr_t)ERR_RET); |
235 | } | ||
236 | 235 | ||
237 | /* Go through linked list, freeing from the malloced (t[-1]) address. */ | 236 | /* Go through linked list, freeing from the malloced (t[-1]) address. */ |
238 | while (p) { | 237 | while (p) { |