[PATCH 1/9] util: Fix condition check in virDiskNameToIndex

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

 



Use the more common '< 0' rather than the non-zero check.
---
 src/util/virutil.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virutil.c b/src/util/virutil.c
index 170e92192..8bdcb02fd 100644
--- a/src/util/virutil.c
+++ b/src/util/virutil.c
@@ -562,7 +562,7 @@ int virDiskNameToIndex(const char *name)
 {
     int idx;

-    if (virDiskNameParse(name, &idx, NULL))
+    if (virDiskNameParse(name, &idx, NULL) < 0)
         idx = -1;

     return idx;
-- 
2.14.3

--
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