]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virPCIDeviceNew: Prefer VIR_RETURN_PTR
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 30 Jul 2019 09:31:53 +0000 (11:31 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 5 Aug 2019 17:42:15 +0000 (19:42 +0200)
commit1ab3d8b49e092a9dfe5475034ba0be2777deeb53
tree52051f120094b8f54237d8a82d8d55006f835327
parent1737d11e1b5bbe36bf574b55d8b031c1328c2226
virPCIDeviceNew: Prefer VIR_RETURN_PTR

This function declares @ret variable and then uses
VIR_STEAL_PTR() to avoid freeing temporary variable @dev which is
constructed. Well, as of 267f1e6da53 we have VIR_RETURN_PTR()
macro so that we can avoid this pattern.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virpci.c