mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
Adapt to VIR_STRDUP and VIR_STRNDUP in tests/*
This commit is contained in:
@@ -57,8 +57,7 @@ test_node_info_parser(collie_test test, char *poolxml)
|
||||
if (!(pool = virStoragePoolDefParseString(poolXmlData)))
|
||||
goto cleanup;
|
||||
|
||||
output = strdup(test.output);
|
||||
if (!output)
|
||||
if (VIR_STRDUP(output, test.output) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virStorageBackendSheepdogParseNodeInfo(pool, output) !=
|
||||
@@ -102,8 +101,7 @@ test_vdi_list_parser(collie_test test, char *poolxml, char *volxml)
|
||||
if (!(vol = virStorageVolDefParseString(pool, volXmlData)))
|
||||
goto cleanup;
|
||||
|
||||
output = strdup(test.output);
|
||||
if (!output)
|
||||
if (VIR_STRDUP(output, test.output) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (virStorageBackendSheepdogParseVdiList(vol, output) !=
|
||||
|
||||
Reference in New Issue
Block a user