[DB-SIG] Re: A small bugfix for sybase module
Peter Godman
pgodman@halcyon.com
Fri, 17 Apr 1998 11:27:30 -0700 (PDT)
On Fri, 17 Apr 1998, Harri PASANEN wrote:
> ctsybasemodule.c
>
> In line 31, where it fills up the description structure, some parenthesis are
> in order. After the fix the line looks like:
>
> ((fmt+i)->status & CS_CANBENULL) != 0); /* nulls ok */
>
>
> In the current release it is like
>
> (fmt+i)->status & CS_CANBENULL != 0); /* nulls ok */
>
> Without the parenthesis at least gcc 2.8.1 on Sparc-Solaris it seems as if it
> is folding the constant CS_CANBENULL != 0 to 1 which then matches
> the wrong status bit.
>
>
> Harri
Strangely, I just noticed the same line yesterday, and thought it looked
odd. However, I didn't know != binds tighter (shame). Thanks for the
patch.
Pete