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.
This commit is contained in:
Sebastian Harl 2011-04-06 16:59:19 +02:00
parent 912df3ef9b
commit 58ef38e2bb

View file

@ -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;
}