]> git.proxmox.com Git - pve-common.git/commitdiff
cli: print table: remove only-once-used default variable
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 20 Jun 2018 12:12:18 +0000 (14:12 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 20 Jun 2018 12:12:18 +0000 (14:12 +0200)
src/PVE/CLIHandler.pm

index 206fda0d201b69968159e9e35c9535a178c45110..b24a0cc6583ccbfa97e190c96e4ed925b1a32480 100644 (file)
@@ -443,12 +443,12 @@ sub print_text_table {
     my $last_col = $formatopts->[$#{$formatopts}];
 
     foreach my $col ( @$formatopts ) {
-       my ($key, $title, $cutoff, $default) = @$col{qw(key title cutoff default)};
+       my ($key, $title, $cutoff) = @$col{qw(key title cutoff)};
        $title //= $key;
 
        push @keys, $key;
        push @titles, $title;
-       $defaults{$key} = $default // '';
+       $defaults{$key} = $col->{default} // '';
 
        # calculate maximal print width and cutoff
        my $titlelen = length($title);