[libvirt] [PATCH 1/3] util: use VIR_AUTOPTR virNodeSuspendSupportsTargetPMUtils
Andrea Bolognani
abologna at redhat.com
Wed Aug 14 09:02:41 UTC 2019
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 at redhat.com>
--
Andrea Bolognani / Red Hat / Virtualization
More information about the libvir-list
mailing list