]> git.proxmox.com Git - pve-container.git/commitdiff
update disk size: avoid variable declared in conditional statement
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 11 Apr 2023 14:41:59 +0000 (16:41 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 11 Apr 2023 14:41:59 +0000 (16:41 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/LXC.pm

index c4d53e8e0fd72f78717e2ac6298126ea76d90c7f..e50d6d12bf5ef52ae61859ae95747486985b0018 100644 (file)
@@ -2104,8 +2104,8 @@ sub update_disksize {
            $changes = 1;
            print "$prefix updated volume size of '$mp->{volume}' in config.\n";
            $mp->{size} = $size;
-           my $nomp = 1 if ($key eq 'rootfs');
-           $conf->{$key} = PVE::LXC::Config->print_ct_mountpoint($mp, $nomp);
+           my $no_mp = $key eq 'rootfs'; # rootfs is handled different from other mount points
+           $conf->{$key} = PVE::LXC::Config->print_ct_mountpoint($mp, $no_mp);
        }
     };