On 9/16/19 9:45 AM, Peter Krempa wrote:
With a nice side-effect of fixing alignment. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> ---
Reviewed-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>
tools/virsh-domain.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 9015c43ba2..9913d703ec 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -8645,17 +8645,15 @@ static const vshCmdOptDef opts_inject_nmi[] = { static bool cmdInjectNMI(vshControl *ctl, const vshCmd *cmd) { - virDomainPtr dom; - bool ret = true; + VIR_AUTOPTR(virshDomain) dom = NULL; if (!(dom = virshCommandOptDomain(ctl, cmd, NULL))) return false; if (virDomainInjectNMI(dom, 0) < 0) - ret = false; + return false; - virshDomainFree(dom); - return ret; + return true; } /*
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list