From: Sebastian Harl Date: Wed, 6 Apr 2011 14:59:19 +0000 (+0200) Subject: check_pgsql: Fixed query perfdata output for empty warn/crit ranges. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f606589141752480dddd329a47dd391f118e2c4d;p=nagiosplug.git 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. --- 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; }