]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: cmdAttachDisk: Refactor control flow
authorPeter Krempa <pkrempa@redhat.com>
Thu, 19 Nov 2020 09:44:12 +0000 (10:44 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 23 Nov 2020 13:44:39 +0000 (14:44 +0100)
commit426369ebfad84ae83ac37adcf36e4890569143af
tree2900676f97428fe89885961a6145532ee24e3d84
parent62903cb11fa004a72ecfb6c7ae35ade89bbe0847
virsh: cmdAttachDisk: Refactor control flow

Remove the unnecessary 'cleanup:' label since we can directly return as
the memory clearing is now automated.

We can also remove the 'functionReturn' variable and use the usual
pattern of returning success.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
tools/virsh-domain.c