Tom Lane <[EMAIL PROTECTED]> writes:
> This change is actually wrong (backwards), no?  You want a true result
> on equality.

*sigh*, I'm an idiot. Thanks for catching my mistake!

> Pretending that the result of strcmp is a bool is a type pun, and
> one that can rise up to bite you.  In the case at hand, strncmp is
> allowed to return (say) 256 to indicate a nonzero result --- which
> would be lost when the value is squeezed into a bool (char).  See
> the archives; we've had at least one bug of this ilk.

Good point, and good to know. I just left the code as it previously
was (but updated the comment), and applied the patch.

Thanks again.


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to