From d04d08a2ec678ade4c1b97f4fba4ff89b6ddde43 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Sun, 25 Jan 2009 17:45:39 +1100 Subject: Fix perl critic warning Make loop variables local --- scripts/vyatta-qos.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/vyatta-qos.pl b/scripts/vyatta-qos.pl index 5db9025..20c56bf 100755 --- a/scripts/vyatta-qos.pl +++ b/scripts/vyatta-qos.pl @@ -60,7 +60,7 @@ sub make_policy { if ($direction) { $policy_type = $policies{$direction}{$type}; } else { - foreach $direction (keys %policies) { + foreach my $direction (keys %policies) { $policy_type = $policies{$direction}{$type}; last if defined $policy_type; } @@ -68,7 +68,7 @@ sub make_policy { # This means template exists but we don't know what it is. if (! defined $policy_type) { - foreach $direction (keys %policies) { + foreach my $direction (keys %policies) { die "QoS policy $name is type $type and is only valid for $direction\n" if defined $policies{$direction}{$type}; } -- cgit v1.2.3