[pmg-devel] [PATCH pmg-api 1/2] style fixup

Wolfgang Bumiller w.bumiller at proxmox.com
Thu Nov 15 10:28:00 CET 2018


Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
---
 PMG/Statistic.pm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/PMG/Statistic.pm b/PMG/Statistic.pm
index bdeac92..ac9473f 100755
--- a/PMG/Statistic.pm
+++ b/PMG/Statistic.pm
@@ -781,15 +781,15 @@ sub postscreen_stat_graph {
     $sth->execute ();
 
     while (my $ref = $sth->fetchrow_hashref()) {
-	@$res[$ref->{index}] = $ref;
+	$res->[$ref->{index}] = $ref;
     }
 
     my $c = int (($to - $from) / $span);
 
-    for (my $i = 0; $i < $c; $i++) {
-	@$res[$i] //= { index => $i, rbl_rejects => 0, pregreet_rejects => 0};
+    for my $i (0..$c) {
+	$res->[$i] //= { index => $i, rbl_rejects => 0, pregreet_rejects => 0};
 
-	my $d = @$res[$i];
+	my $d = $res->[$i];
 	$d->{time} = $from + $i*$span - $timezone;
     }
     $sth->finish();
-- 
2.11.0




More information about the pmg-devel mailing list