mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
tests: use g_strdup instead of VIR_STRDUP
Replace all occurrences of
if (VIR_STRDUP(a, b) < 0)
/* effectively dead code */
with:
a = g_strdup(b);
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
@@ -253,10 +253,7 @@ mymain(void)
|
||||
char *fakerootdir = NULL;
|
||||
char *fakesysfsdir = NULL;
|
||||
|
||||
if (VIR_STRDUP_QUIET(fakerootdir, FAKEROOTDIRTEMPLATE) < 0) {
|
||||
fprintf(stderr, "Out of memory\n");
|
||||
goto cleanup;
|
||||
}
|
||||
fakerootdir = g_strdup(FAKEROOTDIRTEMPLATE);
|
||||
|
||||
if (!mkdtemp(fakerootdir)) {
|
||||
fprintf(stderr, "Cannot create fakerootdir");
|
||||
|
||||
Reference in New Issue
Block a user