[monitoring-plugins] check_ping: fix some variables forgotten during ...

Lorenz Kästle git at monitoring-plugins.org
Mon Mar 17 13:30:12 CET 2025


 Module: monitoring-plugins
 Branch: master
 Commit: abc87a3d6d3ded76f44b87f28604db8a220fc9ba
 Author: Lorenz Kästle <12514511+RincewindsHat at users.noreply.github.com>
   Date: Mon Mar 17 12:57:21 2025 +0100
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=abc87a3d

check_ping: fix some variables forgotten during refactoring

---

 plugins/check_ping.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index 940b9475..6bcdeaad 100644
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
@@ -116,10 +116,10 @@ int main(int argc, char **argv) {
 #	ifdef PING_HAS_TIMEOUT
 		xasprintf(&cmd, rawcmd, timeout_interval, config.max_packets, config.addresses[i]);
 #	else
-		xasprintf(&cmd, rawcmd, config.max_packets, addresses[i]);
+		xasprintf(&cmd, rawcmd, config.max_packets, config.addresses[i]);
 #	endif
 #else
-		xasprintf(&cmd, rawcmd, addresses[i], config.max_packets);
+		xasprintf(&cmd, rawcmd, config.addresses[i], config.max_packets);
 #endif
 
 		if (verbose >= 2) {



More information about the Commits mailing list