Explorar el Código

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 hace 15 años
padre
commit
58ef38e2bb
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      plugins/check_pgsql.c

+ 3 - 1
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;
 }