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>
This commit is contained in:
parent
74e1f321c1
commit
147ac93a06
@ -230,9 +230,8 @@ static void huft_free(huft_t *p)
|
|||||||
* If 'p' has the error bit set we have to clear it, otherwise we might run
|
* If 'p' has the error bit set we have to clear it, otherwise we might run
|
||||||
* into a segmentation fault or an invalid pointer to free(p)
|
* into a segmentation fault or an invalid pointer to free(p)
|
||||||
*/
|
*/
|
||||||
if (BAD_HUFT(p)) {
|
//if (BAD_HUFT(p)) // commented out, since bit clearing has effect only if condition is true
|
||||||
p = (huft_t*)((uintptr_t)(p) ^ (uintptr_t)(ERR_RET));
|
p = (huft_t*)((uintptr_t)p & ~(uintptr_t)ERR_RET);
|
||||||
}
|
|
||||||
|
|
||||||
/* Go through linked list, freeing from the malloced (t[-1]) address. */
|
/* Go through linked list, freeing from the malloced (t[-1]) address. */
|
||||||
while (p) {
|
while (p) {
|
||||||
|
Loading…
Reference in New Issue
Block a user