avoid use of a possible uninitialized variable in to_fahrenheix() function

This commit is contained in:
Jordi Sanfeliu 2013-03-27 18:58:15 +01:00
parent 4efc293f6e
commit 93740519d3
1 changed files with 1 additions and 0 deletions

View File

@ -54,6 +54,7 @@ sub max {
sub to_fahrenheit {
my ($config, $celsius) = @_;
$celsius = $celsius || 0;
if(lc($config->{temperatures_scale}) eq "f") {
return ($celsius * (9 / 5)) + 32;
}