This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]