[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-db-sig
Subject:    [DB-SIG] Re: A small bugfix for sybase module
From:       pgodman () halcyon ! com (Peter Godman)
Date:       1998-04-17 18:27:30
Message-ID: Pine.GUL.3.96.980417112545.4592A-100000 () coho ! halcyon ! com
[Download RAW message or body]

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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic