From daf37fbd6700cb67cb15ce5267d370423d3815ea Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Thu, 31 Oct 2024 13:26:56 +0100 Subject: check_pgsql: do not export local variables diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c index 76ed183..a6411a5 100644 --- a/plugins/check_pgsql.c +++ b/plugins/check_pgsql.c @@ -59,31 +59,31 @@ enum { DEFAULT_CRIT = 8 }; -int process_arguments(int, char **); -int validate_arguments(void); -void print_usage(void); -void print_help(void); -bool is_pg_logname(char *); -int do_query(PGconn *, char *); - -char *pghost = NULL; /* host name of the backend server */ -char *pgport = NULL; /* port of the backend server */ -int default_port = DEFAULT_PORT; -char *pgoptions = NULL; -char *pgtty = NULL; -char dbName[NAMEDATALEN] = DEFAULT_DB; -char *pguser = NULL; -char *pgpasswd = NULL; -char *pgparams = NULL; -double twarn = (double)DEFAULT_WARN; -double tcrit = (double)DEFAULT_CRIT; -char *pgquery = NULL; +static int process_arguments(int, char **); +static int validate_arguments(void); +static void print_usage(void); +static void print_help(void); +static bool is_pg_logname(char *); +static int do_query(PGconn *, char *); + +static char *pghost = NULL; /* host name of the backend server */ +static char *pgport = NULL; /* port of the backend server */ +static char *pgoptions = NULL; +static char *pgtty = NULL; +static char dbName[NAMEDATALEN] = DEFAULT_DB; +static char *pguser = NULL; +static char *pgpasswd = NULL; +static char *pgparams = NULL; +static double twarn = (double)DEFAULT_WARN; +static double tcrit = (double)DEFAULT_CRIT; +static char *pgquery = NULL; +static char *pgqueryname = NULL; +static char *query_warning = NULL; +static char *query_critical = NULL; +static thresholds *qthresholds = NULL; +static int verbose = 0; + #define OPTID_QUERYNAME -1000 -char *pgqueryname = NULL; -char *query_warning = NULL; -char *query_critical = NULL; -thresholds *qthresholds = NULL; -int verbose = 0; /****************************************************************************** -- cgit v0.10-9-g596f