|
From: Jeremy F. <je...@go...> - 2003-11-28 06:07:02
|
On Thu, 2003-11-27 at 15:55, Tom Hughes wrote: > /* Test whether the SIZE argument is valid. It must be a power of > two multiple of sizeof (void *). */ > if (size % sizeof (void *) != 0 || (size & (size - 1)) != 0) > return VKI_EINVAL /*22*/ /*EINVAL*/; > Specifically by the second half of the or condition, which doesn't > seem to make any sense to me. N & (N-1) == 0 iff N is a power of 2 - it's the quick idiom to see if a number is a power of 2 or not. J |