From: Marius Gedminas Date: Mon, 2 Mar 2020 08:01:31 +0000 (+0200) Subject: Apply code review suggestion X-Git-Tag: collectd-5.11.0~11^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1339%2Fhead;p=thirdparty%2Fcollectd.git Apply code review suggestion --- diff --git a/contrib/collection.cgi b/contrib/collection.cgi index 484a2c180..6b0665af8 100755 --- a/contrib/collection.cgi +++ b/contrib/collection.cgi @@ -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); } }