On 4/14/20 7:20 AM, Alberto Garcia wrote:

Hmm. How to avoid it? Maybe, at least, refactor the code, to drop all
sizeof(uint64_t), converting them to L2_ENTRY_SIZE, L1_ENTRY_SIZE,
REFTABLE_ENTRY_SIZE etc?

That wouldn't be a bad thing I guess but, again, for a separate patch or
series.

And all occurrences of pure '8' (not many of them exist)

I think most/all nowadays only refer to the number of bits per byte.

CHAR_BIT (from <limits.h>) is good for that.


Maybe there's a couple that still need to be fixed, but we have been
removing a lot of numeric literals from the qcow2 code (see for example
b6c246942b, 3afea40243 or a35f87f50d).

Berto


--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


Reply via email to