From 99bb7dd0f8f6962e12a3b0e4cd8bab0ebb278f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20K=C3=A4stle?= <12514511+RincewindsHat@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:39:08 +0100 Subject: check_procs: delare file local variables static diff --git a/plugins/check_procs.c b/plugins/check_procs.c index 5777ba0..53c93c0 100644 --- a/plugins/check_procs.c +++ b/plugins/check_procs.c @@ -51,17 +51,17 @@ const char *email = "devel@monitoring-plugins.org"; #include #endif -int process_arguments (int, char **); -int validate_arguments (void); -int convert_to_seconds (char *); -void print_help (void); +static int process_arguments (int /*argc*/, char ** /*argv*/); +static int validate_arguments (void); +static int convert_to_seconds (char * /*etime*/); +static void print_help (void); void print_usage (void); -char *warning_range = NULL; -char *critical_range = NULL; -thresholds *procs_thresholds = NULL; +static char *warning_range = NULL; +static char *critical_range = NULL; +static thresholds *procs_thresholds = NULL; -int options = 0; /* bitmask of filter criteria to test against */ +static int options = 0; /* bitmask of filter criteria to test against */ #define ALL 1 #define STAT 2 #define PPID 4 @@ -89,27 +89,25 @@ enum metric { }; enum metric metric = METRIC_PROCS; -int verbose = 0; -int uid; -pid_t ppid; -int vsz; -int rss; -float pcpu; -char *statopts; -char *prog; -char *exclude_progs; -char **exclude_progs_arr = NULL; -char exclude_progs_counter = 0; -char *args; -char *input_filename = NULL; -regex_t re_args; -char *fmt; -char *fails; -char tmp[MAX_INPUT_BUFFER]; -int kthread_filter = 0; -int usepid = 0; /* whether to test for pid or /proc/pid/exe */ - -FILE *ps_input = NULL; +static int verbose = 0; +static int uid; +static pid_t ppid; +static int vsz; +static int rss; +static float pcpu; +static char *statopts; +static char *prog; +static char *exclude_progs; +static char **exclude_progs_arr = NULL; +static char exclude_progs_counter = 0; +static char *args; +static char *input_filename = NULL; +static regex_t re_args; +static char *fmt; +static char *fails; +static char tmp[MAX_INPUT_BUFFER]; +static int kthread_filter = 0; +static int usepid = 0; /* whether to test for pid or /proc/pid/exe */ static int stat_exe (const pid_t pid, struct stat *buf) { -- cgit v0.10-9-g596f