On 11/14/19 5:42 AM, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/security/virt-aa-helper.c | 4 ++--
src/vbox/vbox_XPCOMCGlue.c | 2 +-
tests/libxlxml2domconfigtest.c | 4 ++--
tests/lxcxml2xmltest.c | 2 +-
tests/qemudomaincheckpointxml2xmltest.c | 2 +-
tests/qemudomainsnapshotxml2xmltest.c | 2 +-
tests/qemufirmwaretest.c | 2 +-
tests/qemuhotplugtest.c | 2 +-
tests/qemumemlocktest.c | 2 +-
tests/qemusecuritytest.c | 2 +-
tests/qemuvhostusertest.c | 2 +-
tests/qemuxml2argvtest.c | 14 +++++++-------
tests/qemuxml2xmltest.c | 4 ++--
tests/securityselinuxhelper.c | 4 ++--
tests/testutils.c | 6 +++---
tests/testutils.h | 4 ++--
tests/testutilsqemu.c | 2 +-
tests/vircgrouptest.c | 8 ++++----
tests/virfiletest.c | 2 +-
tests/virhostdevtest.c | 2 +-
tests/virnettlscontexttest.c | 2 +-
tests/virnettlssessiontest.c | 2 +-
tests/virpcitest.c | 2 +-
tests/virportallocatortest.c | 2 +-
tests/virsystemdtest.c | 18 +++++++++---------
tests/virtimetest.c | 4 ++--
tools/virt-login-shell-helper.c | 12 ++++++------
27 files changed, 57 insertions(+), 57 deletions(-)
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
index 5ac9a9eeb8..12edc9c73f 100644
--- a/src/security/virt-aa-helper.c
+++ b/src/security/virt-aa-helper.c
@@ -1408,11 +1408,11 @@ main(int argc, char **argv)
/* clear the environment */
environ = NULL;
- if (setenv("PATH", "/sbin:/usr/sbin", 1) != 0)
+ if (g_setenv("PATH", "/sbin:/usr/sbin", 1) != 0)
vah_error(ctl, 1, _("could not set PATH"));
/* ensure the traditional IFS setting */
- if (setenv("IFS", " \t\n", 1) != 0)
+ if (g_setenv("IFS", " \t\n", 1) != 0)
vah_error(ctl, 1, _("could not set IFS"));
g_setenv returns gboolean, FALSE on failure. So these need to be
adjusted to == FALSE, or !g_setenv. virt-aa-helper test is failing after
this
There's a few other instances of '< 0' checks which need to be adjusted
too. With those fixed, for the series:
Reviewed-by: Cole Robinson <crobinso(a)redhat.com>
But probably for after freeze
- Cole