diff --git a/scripts/bootgraph.pl b/scripts/bootgraph.pl
index d2c61efc216f4bd413dd271faa3aa62c736c6203..a8635a10fef28fa165df0aa4cb2ab545135042d3 100644
--- a/scripts/bootgraph.pl
+++ b/scripts/bootgraph.pl
@@ -109,8 +109,8 @@ my $stylecounter = 0;
 my %rows;
 my $rowscount = 1;
 my @initcalls = sort { $start{$a} <=> $start{$b} } keys(%start);
-my $key;
-foreach $key (@initcalls) {
+
+foreach my $key (@initcalls) {
 	my $duration = $end{$key} - $start{$key};
 
 	if ($duration >= $threshold) {