From: Greg Sabino Mullane Date: Mon, 22 Sep 2008 14:03:00 +0000 (-0400) Subject: MRTG prefers a 0 a second arg, even when it arrives as undef. X-Git-Tag: 2.9.0~270 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=5a5ed3101e10ae8431fa03c58cdd3726a98b8ac7;p=check_postgres.git MRTG prefers a 0 a second arg, even when it arrives as undef. Thanks to Andras Fabian for catching this. --- diff --git a/check_postgres.pl b/check_postgres.pl index c85b9d47c..3e5749eab 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -358,7 +358,7 @@ sub do_mrtg { ## Hashref of info to pass out for MRTG or stat my $arg = shift; my $one = $arg->{one} || 0; - my $two = $arg->{two} || ''; + my $two = $arg->{two} || 0; if ($SIMPLE) { $one = $two if (length $two and $two > $one); print "$one\n";