tests: use g_new0 instead of VIR_ALLOC

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Ján Tomko
2020-09-23 00:42:45 +02:00
parent cc9674c318
commit a037ae8614
15 changed files with 36 additions and 69 deletions

View File

@@ -176,9 +176,8 @@ static int testAdd(const void *args)
goto cleanup;
}
if (!list &&
VIR_ALLOC(list) < 0)
goto cleanup;
if (!list)
list = g_new0(char *, 1);
if (!(got = virStringListJoin((const char **)list, data->delim))) {
VIR_DEBUG("Got no result");