[libvirt] [PATCH] virpci: Drop unused @ret in virPCIDeviceListDel

Michal Privoznik posted 1 patch 5 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/c50f89db716154c7301b129d225cb40bf3ec44ec.1532707813.git.mprivozn@redhat.com
Test syntax-check passed
src/util/virpci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] virpci: Drop unused @ret in virPCIDeviceListDel
Posted by Michal Privoznik 5 years, 9 months ago
So after 00dc991ca16730 the function is one line long and the
line is declaring a variable which is never used in fact. Replace
it with actual free() call instead of autofree.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---

Pushed under build breaker rule as this is causing clang to complain.
Huh, who uses that? :-P

 src/util/virpci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virpci.c b/src/util/virpci.c
index 634df8d35f..6cf2acf2d1 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -2003,7 +2003,7 @@ void
 virPCIDeviceListDel(virPCIDeviceListPtr list,
                     virPCIDevicePtr dev)
 {
-    VIR_AUTOPTR(virPCIDevice) ret = virPCIDeviceListSteal(list, dev);
+    virPCIDeviceFree(virPCIDeviceListSteal(list, dev));
 }
 
 int
-- 
2.16.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list