diff options
author | Greg Sabino Mullane | 2013-09-24 19:08:30 +0000 |
---|---|---|
committer | Greg Sabino Mullane | 2013-09-24 19:08:30 +0000 |
commit | 0f6655a475c9a45d59acc6c97b01c1fe59ea56e7 (patch) | |
tree | f6f55a79882c2495675f1028ff157cba1a3d6689 /check_postgres.pl | |
parent | 74f8a3d7b3c8a73fcd1d475a9a298ce95225cf97 (diff) |
Remove the no warnings hack.
Diffstat (limited to 'check_postgres.pl')
-rwxr-xr-x | check_postgres.pl | 7 |
1 files changed, 3 insertions, 4 deletions
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 |