Ver código fonte

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.
Sebastian Harl 15 anos atrás
pai
commit
58ef38e2bb
1 arquivos alterados com 3 adições e 1 exclusões
  1. 3 1
      plugins/check_pgsql.c

+ 3 - 1
plugins/check_pgsql.c

@@ -578,7 +578,9 @@ do_query (PGconn *conn, char *query)
 						? _("CRITICAL")
 						? _("CRITICAL")
 						: _("UNKNOWN"));
 						: _("UNKNOWN"));
 	printf (_("'%s' returned %f"), query, value);
 	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;
 	return my_status;
 }
 }