Kaydet (Commit) 146258f8 authored tarafından Christian Lohmaier's avatar Christian Lohmaier

lo-commit-stat: drop unnecessary check whether hash is defined

besides using deprecated syntax – "if (defined %hash)" (or "if (defined
@array)" for that matter) – just using "if (%hash)" (or "if (@array)")
would do, it is also unnecessary to create the hash if it doesn't exist
(autovivification will take care of that)

Change-Id: Ib5704b2d609ae3658f3c166f9e26a051957149f8
üst ad3e1afe
......@@ -68,7 +68,6 @@ sub search_bugs($$$$)
# someone mistyped fdo as fd0
$bug =~ s/^fd0\#/fdo#/;
# save the bug number
%{$pdata->{$module}{$commit_id}{'bugs'}} = () if (! defined %{$pdata->{$module}{$commit_id}{'bugs'}});
$pdata->{$module}{$commit_id}{'bugs'}{$bug} = 1;
}
......@@ -262,7 +261,6 @@ sub get_bug_list($$$)
foreach my $module ( keys %{$pdata}) {
foreach my $id ( keys %{$pdata->{$module}}) {
foreach my $bug (keys %{$pdata->{$module}{$id}{'bugs'}}) {
%{$pbugs->{$bug}} = () if (! defined %{$pbugs->{$bug}});
my $author = $pdata->{$module}{$id}{'author'}{'name'};
my $summary = $pdata->{$module}{$id}{'summary'};
$pbugs->{$bug}{'summary'} = $summary;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment