Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] bitset_invert function [CVS tag: HEAD]

Will do. Thanks for finding this!

Greg

On Oct 18, 2006, at 1:04 AM, yang ke wrote:

Hi,Greg,
 
bitset_invert(bitset *)  [CVS Tags: Root_PERF_20060617, F_2006PER0617, HEAD ]
/*
* Mask out unused high bits
*/
if (b->bs_nbits % sizeof(bits) != 0)
b->bs_bits[b->bs_size-1] &= (1 << (BIT_IN_OBJ(b->bs_nbits-1) + 1)) - 1;
 
 

I noticed in this version, when b->bs_nbits = 4,8,...4n, assumed sizeof(unsigned int) = 4, higher bits of the bitset is not masked out.
 b->bs_nbits should mod (sizeof(bits)<<3).
Can you fix that? Thanks. :-)
 


Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.
_______________________________________________
ptp-dev mailing list


Back to the top