]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: make allocation functions abort on OOM
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 29 Aug 2019 14:23:31 +0000 (15:23 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 13 Sep 2019 09:05:17 +0000 (10:05 +0100)
commit52117fa97e46d27718eaeb92534a0f5800c326ef
tree9ba40d41fcd41945ed6402174b64a75cef095a7f
parent2c52ecd96086b4643b99b4570b5823d40ce2787b
util: make allocation functions abort on OOM

The functions are left returning an "int" to avoid an immediate
big-bang cleanup. They'll simply never return anything other
than 0, except for virInsertN which can still return an error
if the requested insertion index is out of range. Interestingly
in that case, the _QUIET function would none the less report
an error.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/util/viralloc.c
src/util/viralloc.h