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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user