mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-20 21:57:10 -04:00
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:
parent
554b702f9d
commit
5a73671ec6
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue