From: Greg Sabino Mullane Date: Tue, 24 Sep 2013 19:08:30 +0000 (-0400) Subject: Remove the no warnings hack. X-Git-Tag: 2.21.0~1 X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/?a=commitdiff_plain;h=0f6655a475c9a45d59acc6c97b01c1fe59ea56e7;p=check_postgres.git Remove the no warnings hack. --- diff --git a/check_postgres.pl b/check_postgres.pl index 03ab43a23..097c4cbd6 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -5517,10 +5517,9 @@ sub check_pgagent_jobs { : $critical ? 1 : 0; # Determine max time to examine. - my $seconds = do { - no warnings; - $warning > $critical ? $warning : $critical; - }; + my $seconds = $critical; + $seconds = $warning if length $warning and + (! length $critical or $warning > $critical); $SQL = qq{ SELECT jlog.jlgid