From f606589141752480dddd329a47dd391f118e2c4d Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Wed, 6 Apr 2011 16:59:19 +0200 Subject: [PATCH] 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 fee9585..0f6eda4 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; } -- 2.30.2