From 1996da216a8e283a56c87b93263b33adc17b41a4 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Wed, 6 Apr 2016 15:43:40 +0200 Subject: [PATCH] qemu: process: Simplify condition in qemuProcessRefreshBalloonState No need to store failure and re-check right away. --- src/qemu/qemu_process.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index b6769bf2c6..de5c52f753 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2012,10 +2012,7 @@ qemuProcessRefreshBalloonState(virQEMUDriverPtr driver, return -1; rc = qemuMonitorGetBalloonInfo(qemuDomainGetMonitor(vm), &balloon); - if (qemuDomainObjExitMonitor(driver, vm) < 0) - rc = -1; - - if (rc < 0) + if (qemuDomainObjExitMonitor(driver, vm) < 0 || rc < 0) return -1; vm->def->mem.cur_balloon = balloon;