summaryrefslogtreecommitdiff
path: root/tests/nodedevxml2xmltest.c
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2019-10-22 15:26:14 +0200
committerMichal Privoznik <mprivozn@redhat.com>2019-11-12 16:15:59 +0100
commit4fa804c0c72c4786715a22f491c55a18780ca863 (patch)
tree4eb5670b1ae0973431411183642dc59b81de41b3 /tests/nodedevxml2xmltest.c
parent06030f05bbdc1eb8d836829e256a3657f9aee1ee (diff)
downloadlibvirt-4fa804c0c72c4786715a22f491c55a18780ca863.tar.gz
tests: Use g_strdup_printf() instead of virAsprintf()
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Diffstat (limited to 'tests/nodedevxml2xmltest.c')
-rw-r--r--tests/nodedevxml2xmltest.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/nodedevxml2xmltest.c b/tests/nodedevxml2xmltest.c
index 9248a60fbf..6168c29c70 100644
--- a/tests/nodedevxml2xmltest.c
+++ b/tests/nodedevxml2xmltest.c
@@ -72,9 +72,8 @@ testCompareXMLToXMLHelper(const void *data)
int result = -1;
char *xml = NULL;
- if (virAsprintf(&xml, "%s/nodedevschemadata/%s.xml",
- abs_srcdir, (const char*)data) < 0)
- return -1;
+ xml = g_strdup_printf("%s/nodedevschemadata/%s.xml", abs_srcdir,
+ (const char *)data);
result = testCompareXMLToXMLFiles(xml);