• Heikki Linnakangas's avatar
    Fix end-of-loop optimization in pglz_find_match() function. · 3f2adace
    Heikki Linnakangas authored
    After the recent pglz optimization patch, the next/prev pointers in the
    hash table are never NULL, INVALID_ENTRY_PTR is used to represent invalid
    entries instead. The end-of-loop check in pglz_find_match() function didn't
    get the memo. The result was the same from a correctness point of view, but
    because the NULL-check would never fail, the tiny optimization turned into
    a pessimization.
    
    Reported by Stephen Frost, using Coverity scanner.
    3f2adace
pg_lzcompress.c 22.1 KB