[PATCH] qemu: Fix return check on virHashAddEntry call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Luckily it only returns 0 or -1

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 Pushed as trivial..

 Tripped across this while working on something else.  

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

diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index ab5f7cc59..68c00c1e8 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1300,7 +1300,7 @@ qemuSharedDeviceEntryInsert(virQEMUDriverPtr driver,
 
         entry->ref = 1;
 
-        if (virHashAddEntry(driver->sharedDevices, key, entry))
+        if (virHashAddEntry(driver->sharedDevices, key, entry) < 0)
             goto error;
     }
 
-- 
2.13.5

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux