mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-08 02:45:45 +00:00
1ca3c339a1
If one of previous commits taught us something, it's that: sizeof(variable) and sizeof(type) are not the same. Especially because for live enough code the type might change (e.g. as we use autoptr more). And since we don't get any warnings when an incorrect length is passed to memset() it is easy to mess up. But with sizeof(variable) instead, it's not as easy. Therefore, switch to using memset(variable, 0, sizeof(*variable)), or its alternatives, depending on level of pointers. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Claudio Fontana <cfontana@suse.de> |
||
---|---|---|
.. | ||
meson.build | ||
test_driver.c | ||
test_driver.h | ||
test-screenshot.png |