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

Re: [libvirt] [PATCH 1/3] util: use VIR_AUTOPTR virNodeSuspendSupportsTargetPMUtils



On Tue, 2019-08-13 at 17:24 +0200, Ján Tomko wrote:
> +++ b/src/util/virnodesuspend.c
> @@ -238,9 +238,8 @@ int virNodeSuspend(unsigned int target,
>     /*
>      * Check return code of command == 0 for success
>      * (i.e., the PM capability is supported)
>      */
>      *supported = (status == 0);
> -    ret = 0;
> -
> - cleanup:
> -    virCommandFree(cmd);
> -    return ret;
> +    return 0;

Please leave an empty line before 'return'.

Also this doesn't build:

  util/virnodesuspend.c: In function 'virNodeSuspendSupportsTargetPMUtils':
  util/virnodesuspend.c:257:16: error: 'ret' undeclared (first use in this function)
    257 |         return ret;
        |                ^~~

With the obvious fix (s/ret/-1/) applied and the empty line added,

  Reviewed-by: Andrea Bolognani <abologna redhat com>

-- 
Andrea Bolognani / Red Hat / Virtualization


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