the not definedness check is unecessary here, since it does not
do anything then, and to check balloon twice is also not necessary

Signed-off-by: Dominik Csapak <d.csa...@proxmox.com>
---
 PVE/QemuServer.pm | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 2a07bce..648a5f8 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -4922,10 +4922,8 @@ sub vm_start {
            }
 
        } else {
-           if (!$statefile && (!defined($conf->{balloon}) || 
$conf->{balloon})) {
-               vm_mon_cmd_nocheck($vmid, "balloon", value => 
$conf->{balloon}*1024*1024)
-                   if $conf->{balloon};
-           }
+           vm_mon_cmd_nocheck($vmid, "balloon", value => 
$conf->{balloon}*1024*1024)
+               if !$statefile && $conf->{balloon};
 
            foreach my $opt (keys %$conf) {
                next if $opt !~  m/^net\d+$/;
-- 
2.11.0


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to