[libvirt] [PATCH 04/11] util: use glib memory allocation functions

Pavel Hrdina phrdina at redhat.com
Mon Sep 30 10:02:17 UTC 2019


On Fri, Sep 27, 2019 at 06:17:26PM +0100, Daniel P. Berrangé wrote:
> Convert the VIR_ALLOC family of APIs with use of the g_malloc family of
> APIs. Use of VIR_ALLOC related functions should be incrementally phased
> out over time, allowing return value checks to be dropped. Use of
> VIR_FREE should be replaced with auto-cleanup whenever possible.
> 
> We previously used the 'calloc-posix' gnulib module because mingw does
> not set errno to ENOMEM on failure.
> 
> Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> ---
>  bootstrap.conf      |  1 -
>  src/util/viralloc.c | 29 ++++++-----------------------
>  2 files changed, 6 insertions(+), 24 deletions(-)

\o/ Another gnulib module removed.  On Friday I was trying to figure out
how to incorporate gnulib into meson build system and it's not easy at
all and still I did not verify that it actually works so we might need
to get rid of gnulib before we can do that conversion.

Reviewed-by: Pavel Hrdina <phrdina at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190930/1fb371b4/attachment-0001.sig>


More information about the libvir-list mailing list