[libvirt PATCH v2 01/15] replace g_new() with g_new0() for consistency

Ján Tomko jtomko at redhat.com
Wed Jul 15 14:29:10 UTC 2020

On a Tuesday in 2020, Laine Stump wrote:
>g_new() is used in only 3 places. Switching them to g_new0() will do
>no harm, reduces confusion, and helps me sleep better at night knowing

Sweet dreams.

>that all allocated memory is initialized to 0 :-) (Yes, I *know* that
>in all three cases the associated memory is immediately assigned some
>other value. Today.)
>Signed-off-by: Laine Stump <laine at redhat.com>
> src/qemu/qemu_backup.c  | 2 +-
> src/util/virutil.c      | 2 +-
> tests/qemuhotplugmock.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Ján Tomko <jtomko at redhat.com>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200715/cae1c5dc/attachment-0001.sig>

More information about the libvir-list mailing list