From 9a73a94258689cd9337fe7a7937fe85e4670aaeb Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Fri, 4 Nov 2022 17:08:36 +0100 Subject: Replace DBL_MAX with INFITY to check if value was set diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index 0d10d22..7f3c4b5 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c @@ -55,6 +55,7 @@ const char *email = "devel@monitoring-plugins.org"; #include #include #include +#include #include #include #include @@ -1220,7 +1221,7 @@ finish(int sig) host->rta / 1000, (float)warn.rta / 1000, (float)crit.rta / 1000, (targets > 1) ? host->name : "", host->pl, warn.pl, crit.pl, (targets > 1) ? host->name : "", (float)host->rtmax / 1000, - (targets > 1) ? host->name : "", (host->rtmin < DBL_MAX) ? (float)host->rtmin / 1000 : (float)0); + (targets > 1) ? host->name : "", (host->rtmin < INFINITY) ? (float)host->rtmin / 1000 : (float)0); host = host->next; } @@ -1323,7 +1324,7 @@ add_target_ip(char *arg, struct sockaddr_storage *in) memcpy(host_sin6->sin6_addr.s6_addr, sin6->sin6_addr.s6_addr, sizeof host_sin6->sin6_addr.s6_addr); } - host->rtmin = DBL_MAX; + host->rtmin = INFINITY; if(!list) list = cursor = host; else cursor->next = host; -- cgit v0.10-9-g596f