mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
tests: Use g_strdup_printf() instead of virAsprintf()
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
@@ -82,20 +82,17 @@ testCompareXMLToXMLHelper(const void *data)
|
||||
char *updatexml = NULL;
|
||||
char *outxml = NULL;
|
||||
|
||||
if (virAsprintf(&netxml, "%s/networkxml2xmlin/%s.xml",
|
||||
abs_srcdir, info->netxml) < 0 ||
|
||||
virAsprintf(&updatexml, "%s/networkxml2xmlupdatein/%s.xml",
|
||||
abs_srcdir, info->updatexml) < 0 ||
|
||||
virAsprintf(&outxml, "%s/networkxml2xmlupdateout/%s.xml",
|
||||
abs_srcdir, info->outxml) < 0) {
|
||||
goto cleanup;
|
||||
}
|
||||
netxml = g_strdup_printf("%s/networkxml2xmlin/%s.xml",
|
||||
abs_srcdir, info->netxml);
|
||||
updatexml = g_strdup_printf("%s/networkxml2xmlupdatein/%s.xml",
|
||||
abs_srcdir, info->updatexml);
|
||||
outxml = g_strdup_printf("%s/networkxml2xmlupdateout/%s.xml",
|
||||
abs_srcdir, info->outxml);
|
||||
|
||||
result = testCompareXMLToXMLFiles(netxml, updatexml, outxml, info->flags,
|
||||
info->command, info->section,
|
||||
info->parentIndex, info->expectFailure);
|
||||
|
||||
cleanup:
|
||||
VIR_FREE(netxml);
|
||||
VIR_FREE(updatexml);
|
||||
VIR_FREE(outxml);
|
||||
|
||||
Reference in New Issue
Block a user