Fix: Initialize values

Otherwise, there's a warning about unitialized values:
Use of uninitialized value $hours in numeric gt (>) at ...
Use of uninitialized value $days in numeric gt (>) at ...
This commit is contained in:
Bernd Arnold 2018-06-09 10:02:23 +02:00
parent 554b702f9d
commit 5a73671ec6

View file

@ -85,6 +85,7 @@ if ( $uptime_seconds !~ /^\d+$/ ) {
my ( $secs, $mins, $hours, $days, $weeks );
$secs = $uptime_seconds;
$mins = $hours = $days = $weeks = 0;
if ( $secs > 100 ) {
$mins = int( $secs / 60 );
$secs -= $mins * 60;