• Alvaro Herrera's avatar
    Change some test macros to return true booleans · 594e61a1
    Alvaro Herrera authored
    These macros work fine when they are used directly in an "if" test or
    similar, but as soon as the return values are assigned to boolean
    variables (or passed as boolean arguments to some function), they become
    bugs, hopefully caught by compiler warnings.  To avoid future problems,
    fix the definitions so that they return actual booleans.
    
    To further minimize the risk that somebody uses them in back-patched
    fixes that only work correctly in branches starting from the current
    master and not in old ones, back-patch the change to supported branches
    as appropriate.
    
    See also commit af4472bc, and the long
    discussion (and larger patch) in the thread mentioned in its commit
    message.
    
    Discussion: https://postgr.es/m/18672.1483022414@sss.pgh.pa.us
    594e61a1
htup_details.h 28.5 KB