]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Apply code review suggestion 1339/head
authorMarius Gedminas <marius@gedmin.as>
Mon, 2 Mar 2020 08:01:31 +0000 (10:01 +0200)
committerMarius Gedminas <marius@gedmin.as>
Mon, 2 Mar 2020 08:01:31 +0000 (10:01 +0200)
contrib/collection.cgi

index 484a2c1805e1d362057c2f8919aee614fb9930d9..6b0665af868c6f18412ed5580bae6d7f3de77392 100755 (executable)
@@ -77,9 +77,9 @@ sub read_types_db
                my ($type, $specs) = split(m/\s+/, $line, 2);
                my @specs = split(m/,?\s+/, $specs);
                $Types->{$type} = [];
-               for (my $i = 0; $i < @specs; $i++)
+               foreach my $spec (@specs)
                {
-                       my ($name, $ds_type, $min, $max) = split(m/:/, $specs[$i]);
+                       my ($name, $ds_type, $min, $max) = split(m/:/, $spec);
                        push (@{$Types->{$type}}, $name);
                }
        }