]> xenbits.xensource.com Git - libvirt.git/commit
viralloc: Remove VIR_ALLOC_VAR
authorPeter Krempa <pkrempa@redhat.com>
Wed, 3 Feb 2021 12:43:28 +0000 (13:43 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 3 Feb 2021 15:09:25 +0000 (16:09 +0100)
commitbfdfa64010f3721e6118c4e501f2984f592b33ed
treeeb000da4bb59a1095b469d36f65d6fc1dfaa99d1
parent52ca0a6229ae56865a09e164737dce703f1690ba
viralloc: Remove VIR_ALLOC_VAR

The use case VIR_ALLOC_VAR deals with is very unlikely. We had just 2
legitimate uses, which were reimplemented locally using g_malloc0 and
sizeof instead as they used a static number of members of the trailing
array.

Remove VIR_ALLOC_VAR since in most cases the direct implementation is
shorter and clearer and there are no users of it currently.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/libvirt_private.syms
src/util/viralloc.c
src/util/viralloc.h