diff options
author | Ján Tomko <jtomko@redhat.com> | 2020-09-23 01:04:17 +0200 |
---|---|---|
committer | Ján Tomko <jtomko@redhat.com> | 2020-09-23 16:49:01 +0200 |
commit | 5eed9a6ab3fe4d824657b0ad29d186dab5cd9f5a (patch) | |
tree | 622bc73488acab5c35c79c153b9eeded1fda2568 /tests/commandtest.c | |
parent | d20268178175cea7d86d19e370dc70e72905fc14 (diff) | |
download | libvirt-5eed9a6ab3fe4d824657b0ad29d186dab5cd9f5a.tar.gz |
tests: use g_new0 instead of VIR_ALLOC_N
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Diffstat (limited to 'tests/commandtest.c')
-rw-r--r-- | tests/commandtest.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/commandtest.c b/tests/commandtest.c index cbbcda4e5f..df86725f0e 100644 --- a/tests/commandtest.c +++ b/tests/commandtest.c @@ -1057,10 +1057,9 @@ static int test27(const void *unused G_GNUC_UNUSED) "%s%s%s" \ "END STDERR\n" - if (VIR_ALLOC_N(buffer0, buflen) < 0 || - VIR_ALLOC_N(buffer1, buflen) < 0 || - VIR_ALLOC_N(buffer2, buflen) < 0) - goto cleanup; + buffer0 = g_new0(char, buflen); + buffer1 = g_new0(char, buflen); + buffer2 = g_new0(char, buflen); memset(buffer0, 'H', buflen - 2); buffer0[buflen - 2] = '\n'; |