-
The proper C++ equivalent of struct foo x; memset(&x, 0, sizeof(x)); is struct foo x = {}; Not only is it shorter, it is also safer for any non-POD type, since it will not overwrite vtable pointers, incorrectly zero pointer-to-member fields, or clobber default initializations if any was specified in the struct/class. So it is overall a good habit to take to avoid mistakes if the C style was copy-pasted for C++ structs. Signed-off-by: Christophe de Dinechin <dinechin@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
ea66333c