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:
Ján Tomko
2019-10-20 13:49:46 +02:00
parent ddb99ca516
commit 29b1e859e3
39 changed files with 115 additions and 222 deletions

View File

@@ -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");