From 702dc596a4a6ed124751c55cbd5c62f96ae8a157 Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Thu, 31 Oct 2024 03:30:42 +0100 Subject: check_dns: do not export local variables diff --git a/plugins/check_dns.c b/plugins/check_dns.c index 7cd2316..911853b 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c @@ -39,26 +39,26 @@ const char *email = "devel@monitoring-plugins.org"; #include "netutils.h" #include "runcmd.h" -int process_arguments(int, char **); -int validate_arguments(void); -int error_scan(char *, bool *); -bool ip_match_cidr(const char *, const char *); -unsigned long ip2long(const char *); -void print_help(void); +static int process_arguments(int, char **); +static int validate_arguments(void); +static int error_scan(char *, bool *); +static bool ip_match_cidr(const char *, const char *); +static unsigned long ip2long(const char *); +static void print_help(void); void print_usage(void); #define ADDRESS_LENGTH 256 -char query_address[ADDRESS_LENGTH] = ""; -char dns_server[ADDRESS_LENGTH] = ""; -char ptr_server[ADDRESS_LENGTH] = ""; -bool verbose = false; -char **expected_address = NULL; -int expected_address_cnt = 0; -bool expect_nxdomain = false; - -bool expect_authority = false; -bool all_match = false; -thresholds *time_thresholds = NULL; +static char query_address[ADDRESS_LENGTH] = ""; +static char dns_server[ADDRESS_LENGTH] = ""; +static char ptr_server[ADDRESS_LENGTH] = ""; +static bool verbose = false; +static char **expected_address = NULL; +static int expected_address_cnt = 0; +static bool expect_nxdomain = false; + +static bool expect_authority = false; +static bool all_match = false; +static thresholds *time_thresholds = NULL; static int qstrcmp(const void *p1, const void *p2) { /* The actual arguments to this function are "pointers to -- cgit v0.10-9-g596f