]> git.proxmox.com Git - pve-container.git/commitdiff
cleanup: use //= operator
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 31 Jul 2015 07:09:48 +0000 (09:09 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 31 Jul 2015 07:09:48 +0000 (09:09 +0200)
src/PVE/API2/LXC.pm

index 1983954f1b57380619d0826fcde4ff734c4ae363..b6e2c1433db3b7143d3f9766130aa9f3edde3b24 100644 (file)
@@ -249,7 +249,7 @@ __PACKAGE__->register_method({
 
        $param->{hostname} ||= "CT$vmid" if !defined($conf->{'lxc.utsname'});
        $param->{memory} ||= 512 if !defined($conf->{'lxc.cgroup.memory.limit_in_bytes'});
-       $param->{swap} = 512 if (!defined($param->{swap}) && !defined($conf->{'lxc.cgroup.memory.memsw.limit_in_bytes'}));
+       $param->{swap} //= 512 if !defined($conf->{'lxc.cgroup.memory.memsw.limit_in_bytes'});
 
        PVE::LXC::update_lxc_config($vmid, $conf, 0, $param);