]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virJSONValue(Array|Object)Append*: Simplify handling of appended object
authorPeter Krempa <pkrempa@redhat.com>
Fri, 12 Feb 2021 09:51:31 +0000 (10:51 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Sat, 20 Feb 2021 12:26:37 +0000 (13:26 +0100)
commit7d3a33b26ba7206568e21351694d7db7cb265eed
tree553ac58c5d86138460f225ab145d575cb3c829ec
parent3e411cbc5f0efc9f7f294b9ae127f399f44cbe04
virJSONValue(Array|Object)Append*: Simplify handling of appended object

Use g_autofree for the pointer of the added object and remove the NULL
checks for values returned by virJSONValueNew* (except
virJSONValueNewNumberDouble) since they can't fail nowadays.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virjson.c