]> xenbits.xensource.com Git - libvirt.git/commit
virHashAddOrUpdateEntry: Simplify allocation of new entry
authorPeter Krempa <pkrempa@redhat.com>
Fri, 31 Jan 2020 07:41:55 +0000 (08:41 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 4 Feb 2020 12:45:33 +0000 (13:45 +0100)
commit509ddcfde2af565a63ba193d41395aa99ea4744e
treed8a6e3b5ac5a9deb8706b404b565f700b0674c42
parent6cf3ec4428c6b3f3dae30286e50bb7396615cf56
virHashAddOrUpdateEntry: Simplify allocation of new entry

Use g_new0 and skip checking of the return value of keyCopy callback
as both are bound to return a valid pointer.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virhash.c