From 58ef38e2bb9503f4fbcca5fb8b17ccaf47f9ed67 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Wed, 6 Apr 2011 16:59:19 +0200 Subject: check_pgsql: Fixed query perfdata output for empty warn/crit ranges. Previously, "(null)" was printed (when using GNU's libc). This has been changed to print the empty string instead. --- plugins/check_pgsql.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c index edad116a..2acddc4f 100644 --- a/plugins/check_pgsql.c +++ b/plugins/check_pgsql.c @@ -578,7 +578,9 @@ do_query (PGconn *conn, char *query) ? _("CRITICAL") : _("UNKNOWN")); printf (_("'%s' returned %f"), query, value); - printf ("|query=%f;%s;%s;0\n", value, query_warning, query_critical); + printf ("|query=%f;%s;%s;0\n", value, + query_warning ? query_warning : "", + query_critical ? query_critical : ""); return my_status; } -- cgit v1.2.3-74-g34f1