removing warnings for uninitialized values
when 'alt', 'cve' or 'mil' data is not available, the variables contain the undefined value. As such, calling length() on them trigger a warning. This patch changes the validation to simply check if the variables are defined.
This commit is contained in:
parent
de0d186246
commit
ccbc19f92c
1 changed files with 4 additions and 4 deletions
|
|
@ -102,10 +102,10 @@ foreach my $key(keys %h){
|
|||
my $alt = $h{$key}->{alt};
|
||||
my $cve = $h{$key}->{cve};
|
||||
my $mlw = $h{$key}->{mil};
|
||||
if ((length ($alt) >0)||(length ($cve) >0)){print "\n";}
|
||||
if (length ($alt) >0){ print " Alt: $alt ";}
|
||||
if (length ($cve) >0){ print " CVE-$cve";}
|
||||
if (length ($mlw) >0){ print "\n Source: $mlw";}
|
||||
if ($alt or $cve){print "\n";}
|
||||
if ($alt){ print " Alt: $alt ";}
|
||||
if ($cve){ print " CVE-$cve";}
|
||||
if ($mlw){ print "\n Source: $mlw";}
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue