[libvirt PATCH 1/7] testutils: check return value of g_setenv

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

 



The function returns gboolean.
Compare against the FALSE value from GLib.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
Fixes: 2c3353242337bb50fe5abc9454fd5fc98236d4ef
---
 tests/testutils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/testutils.c b/tests/testutils.c
index 0cf0ac7e5c..83daed8940 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -836,7 +836,7 @@ virTestSetEnvPath(void)
     }
 
     if (new_path &&
-        g_setenv("PATH", new_path, TRUE) < 0)
+        g_setenv("PATH", new_path, TRUE) == FALSE)
         goto cleanup;
 
     ret = 0;
-- 
2.21.1





[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