Adapt to VIR_STRDUP and VIR_STRNDUP in tests/*

This commit is contained in:
Michal Privoznik
2013-05-10 11:54:29 +02:00
parent aaf8114d56
commit e60b9783e1
16 changed files with 71 additions and 67 deletions
+2 -4
View File
@@ -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) !=