[libvirt PATCH 1/3] nodedev: remove unnecessary null check

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

 



g_strdup_printf() is guaranteed to return a non-NULL value, so remove
the unnecessary check for NULL.

Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
---
 src/util/virmdev.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/util/virmdev.c b/src/util/virmdev.c
index 7f4a499536..102eb2bf67 100644
--- a/src/util/virmdev.c
+++ b/src/util/virmdev.c
@@ -208,9 +208,6 @@ virMediatedDeviceGetIOMMUGroupDev(const char *uuidstr)
     g_autofree char *iommu_path = NULL;
     g_autofree char *dev_path = virMediatedDeviceGetSysfsPath(uuidstr);
 
-    if (!dev_path)
-        return NULL;
-
     iommu_path = g_strdup_printf("%s/iommu_group", dev_path);
 
     if (!virFileExists(iommu_path)) {
-- 
2.26.3




[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