From 5a73671ec6299c480c90ec5b9f0f3d58397fbcfb Mon Sep 17 00:00:00 2001 From: Bernd Arnold Date: Sat, 9 Jun 2018 10:02:23 +0200 Subject: 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 ... --- plugins-scripts/check_uptime.pl | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins-scripts') diff --git a/plugins-scripts/check_uptime.pl b/plugins-scripts/check_uptime.pl index 27dc93ff..20234c88 100755 --- a/plugins-scripts/check_uptime.pl +++ b/plugins-scripts/check_uptime.pl @@ -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; -- cgit v1.2.3