diff options
author | Michal Privoznik <mprivozn@redhat.com> | 2019-10-22 15:26:14 +0200 |
---|---|---|
committer | Michal Privoznik <mprivozn@redhat.com> | 2019-11-12 16:15:59 +0100 |
commit | 4fa804c0c72c4786715a22f491c55a18780ca863 (patch) | |
tree | 4eb5670b1ae0973431411183642dc59b81de41b3 /tests/storagepoolcapstest.c | |
parent | 06030f05bbdc1eb8d836829e256a3657f9aee1ee (diff) | |
download | libvirt-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/storagepoolcapstest.c')
-rw-r--r-- | tests/storagepoolcapstest.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/storagepoolcapstest.c b/tests/storagepoolcapstest.c index 6b0680291e..28b9f7d90a 100644 --- a/tests/storagepoolcapstest.c +++ b/tests/storagepoolcapstest.c @@ -62,10 +62,8 @@ test_virStoragePoolCapsFormat(const void *opaque) if (!(poolCaps = virStoragePoolCapsNew(driverCaps))) return -1; - if (virAsprintf(&path, "%s/storagepoolcapsschemadata/poolcaps-%s.xml", - abs_srcdir, data->filename) < 0) { - return -1; - } + path = g_strdup_printf("%s/storagepoolcapsschemadata/poolcaps-%s.xml", + abs_srcdir, data->filename); if (!(poolCapsXML = virStoragePoolCapsFormat(poolCaps))) return -1; |