This is the mail archive of the
xconq7@sources.redhat.com
mailing list for the Xconq project.
Side Mask
- From: "Stanley Sutton" <sutton at t-surf dot com>
- To: <xconq7 at sources dot redhat dot com>
- Date: Tue, 23 Jul 2002 10:53:53 -0500
- Subject: Side Mask
Currently, the side mask set operation is defined as:
#define add_side_to_set(side,mask) ((mask) | (1 << ((side) ? (side)->id
: 0)))
It would seem to be better to define it as:
#define add_side_to_set(side,mask) ((mask) | ((side)?(1 << (side)->id) :
0)))
since that would not modify the mask if the side pointer is null, where
the current definition would set the 0'th (or 31st depending on how you
number the bits) bit if the side mask is null. If the side id can be 0
(which I haven't dug through the code to find out), side 0 or a null
poiter would set the same bit. The remove side from mask would need a
similar correction.