On 03/12/2013 10:03 AM, Peter Lieven wrote: >>> + if (((uintptr_t) buf) % sizeof(VECTYPE) == 0 >>> + && len % 8*sizeof(VECTYPE) == 0) { >> >> Space around binary operators. Use CHAR_BITS instead of a magic number >> 8.
> the 8 is not BITS_PER_BYTE or CHAR_BITS its the number of > vectors in one loop in buffer_find_nonzero_offset(). I will add > a constant for this to make it clearer. Indeed, now I see it - 8 is the unroll factor. Well, all the more evidence that a named constant makes the code easier to read, compared to me mis-interpreting the magic number. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature