]> git.ipfire.org Git - thirdparty/libvirt.git/commit
cmdStartGetFDs: Modernize
authorPeter Krempa <pkrempa@redhat.com>
Thu, 27 Jan 2022 16:14:32 +0000 (17:14 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 17 Feb 2022 14:53:58 +0000 (15:53 +0100)
commitb0015df263d1870a5558a17b28e722dc445a3ba3
tree69bfc7b07c492a7fa7d7aa4d2131fc96b6211cb9
parentc98432784a0a7d35b03e42e3153686dfb1631ed2
cmdStartGetFDs: Modernize

Calculate the length of the FD list beforehand to avoid multiple
expansions and mainly simplify the code and use automatic freeing to
remove the error code path.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tools/virsh-domain.c