Re: [PATCH v2 2/3] virsh-domain: Fix @ret handling in cmdSetmem and cmdSetmaxmem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  tools/virsh-domain.c | 28 ++++++++++++++--------------
>  1 file changed, 14 insertions(+), 14 deletions(-)

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux