summaryrefslogtreecommitdiffstats
path: root/plugins/check_ntp_time.c
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-12-04 13:24:14 +0100
committerGitHub <noreply@github.com>2025-12-04 13:24:14 +0100
commit3ae751ed67bb59c5073e0a160f4125ba2a5ff1e4 (patch)
tree39b114378f77cf0b135166ff52166c0aaacf379f /plugins/check_ntp_time.c
parentc735cf423417eee6de8624cd7032ebf8aeeef7ad (diff)
downloadmonitoring-plugins-3ae751ed67bb59c5073e0a160f4125ba2a5ff1e4.tar.gz
Fix check_ntp_time without a socket (#2196)
In the previous commit I unintentionally introduced an error through symbol shadowing. This should fix check_ntp_time when the target address is a network address.
Diffstat (limited to 'plugins/check_ntp_time.c')
-rw-r--r--plugins/check_ntp_time.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/plugins/check_ntp_time.c b/plugins/check_ntp_time.c
index 1300faea..9e0beb9c 100644
--- a/plugins/check_ntp_time.c
+++ b/plugins/check_ntp_time.c
@@ -348,7 +348,6 @@ static offset_request_wrapper offset_request(const char *host, const char *port,
348 is_socket = false; 348 is_socket = false;
349 349
350 /* fill in ai with the list of hosts resolved by the host name */ 350 /* fill in ai with the list of hosts resolved by the host name */
351 struct addrinfo *addresses = NULL;
352 int ga_result = getaddrinfo(host, port, &hints, &addresses); 351 int ga_result = getaddrinfo(host, port, &hints, &addresses);
353 if (ga_result != 0) { 352 if (ga_result != 0) {
354 die(STATE_UNKNOWN, "error getting address for %s: %s\n", host, gai_strerror(ga_result)); 353 die(STATE_UNKNOWN, "error getting address for %s: %s\n", host, gai_strerror(ga_result));