On Wed, May 19, 2021 at 12:16:56 +0200, Michal Privoznik wrote:
These functions initialize @ret to true and only after something
fails either they call cleanup code (which consists only from
virshDomainFree()) and return false, or they set ret = false and
carry on (when the failure occurred close to cleanup code).
Switch them to the usual pattern in which ret is initialized to
failure, goto cleanup is used and ret is set to true only after
everything succeeded.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tools/virsh-domain.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
Reviewed-by: Peter Krempa <pkrempa(a)redhat.com>