From: Ján Tomko Date: Sun, 9 Feb 2020 00:26:08 +0000 (+0100) Subject: testutils: check return value of g_setenv X-Git-Tag: v6.1.0-rc1~163 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=879e9db194865d70b7d66b1087a5d6903e902eab;p=thirdparty%2Flibvirt.git testutils: check return value of g_setenv The function returns gboolean. Compare against the FALSE value from GLib. Signed-off-by: Ján Tomko Fixes: 2c3353242337bb50fe5abc9454fd5fc98236d4ef Reviewed-by: Daniel P. Berrangé --- 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;