]> git.proxmox.com Git - pve-container.git/commitdiff
fixup: slight code cleanup
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 30 Jan 2019 13:53:37 +0000 (14:53 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 30 Jan 2019 13:53:37 +0000 (14:53 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/API2/LXC/Config.pm

index ead8e6707d1d4d98e6e5f69394f303e3cf395519..1399735ed25ded4e70c1172410eb27c5ed74aac7 100644 (file)
@@ -65,11 +65,9 @@ __PACKAGE__->register_method({
 
        my $conf = PVE::LXC::Config->load_config($param->{vmid});
 
-       my $snapname = $param->{snapshot};
-       if ($snapname) {
+       if (my $snapname = $param->{snapshot}) {
            my $snapshot = $conf->{snapshots}->{$snapname};
-           die "snapshot '$snapname' does not exist\n"
-               if !defined($snapshot);
+           die "snapshot '$snapname' does not exist\n" if !defined($snapshot);
 
            # we need the digest of the file
            $snapshot->{digest} = $conf->{digest};