mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
tests/qtest: Use g_setenv()
Windows does not provide a setenv() API, but glib does. Replace setenv() call with the glib version. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20220824094029.1634519-2-bmeng.cn@gmail.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
9a99f964b1
commit
a47ea61de5
2 changed files with 5 additions and 5 deletions
|
@ -994,16 +994,16 @@ static GString *generic_fuzz_predefined_config_cmdline(FuzzTarget *t)
|
|||
g_assert(t->opaque);
|
||||
|
||||
config = t->opaque;
|
||||
setenv("QEMU_AVOID_DOUBLE_FETCH", "1", 1);
|
||||
g_setenv("QEMU_AVOID_DOUBLE_FETCH", "1", 1);
|
||||
if (config->argfunc) {
|
||||
args = config->argfunc();
|
||||
setenv("QEMU_FUZZ_ARGS", args, 1);
|
||||
g_setenv("QEMU_FUZZ_ARGS", args, 1);
|
||||
g_free(args);
|
||||
} else {
|
||||
g_assert_nonnull(config->args);
|
||||
setenv("QEMU_FUZZ_ARGS", config->args, 1);
|
||||
g_setenv("QEMU_FUZZ_ARGS", config->args, 1);
|
||||
}
|
||||
setenv("QEMU_FUZZ_OBJECTS", config->objects, 1);
|
||||
g_setenv("QEMU_FUZZ_OBJECTS", config->objects, 1);
|
||||
return generic_fuzz_cmdline(t);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue