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

@@ -122,8 +122,7 @@ checkPath(const char *path,
} else {
/* Yeah, our worst nightmares just became true. Path does
* not exist. Cut off the last component and retry. */
if (VIR_STRDUP_QUIET(crippledPath, relPath ? relPath : path) < 0)
goto error;
crippledPath = g_strdup(relPath ? relPath : path);
virFileRemoveLastComponent(crippledPath);