summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins-root/check_icmp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c
index 0d10d22d..7f3c4b5b 100644
--- a/plugins-root/check_icmp.c
+++ b/plugins-root/check_icmp.c
@@ -55,6 +55,7 @@ const char *email = "devel@monitoring-plugins.org";
55#include <errno.h> 55#include <errno.h>
56#include <signal.h> 56#include <signal.h>
57#include <ctype.h> 57#include <ctype.h>
58#include <float.h>
58#include <net/if.h> 59#include <net/if.h>
59#include <netinet/in_systm.h> 60#include <netinet/in_systm.h>
60#include <netinet/in.h> 61#include <netinet/in.h>
@@ -1220,7 +1221,7 @@ finish(int sig)
1220 host->rta / 1000, (float)warn.rta / 1000, (float)crit.rta / 1000, 1221 host->rta / 1000, (float)warn.rta / 1000, (float)crit.rta / 1000,
1221 (targets > 1) ? host->name : "", host->pl, warn.pl, crit.pl, 1222 (targets > 1) ? host->name : "", host->pl, warn.pl, crit.pl,
1222 (targets > 1) ? host->name : "", (float)host->rtmax / 1000, 1223 (targets > 1) ? host->name : "", (float)host->rtmax / 1000,
1223 (targets > 1) ? host->name : "", (host->rtmin < DBL_MAX) ? (float)host->rtmin / 1000 : (float)0); 1224 (targets > 1) ? host->name : "", (host->rtmin < INFINITY) ? (float)host->rtmin / 1000 : (float)0);
1224 1225
1225 host = host->next; 1226 host = host->next;
1226 } 1227 }
@@ -1323,7 +1324,7 @@ add_target_ip(char *arg, struct sockaddr_storage *in)
1323 memcpy(host_sin6->sin6_addr.s6_addr, sin6->sin6_addr.s6_addr, sizeof host_sin6->sin6_addr.s6_addr); 1324 memcpy(host_sin6->sin6_addr.s6_addr, sin6->sin6_addr.s6_addr, sizeof host_sin6->sin6_addr.s6_addr);
1324 } 1325 }
1325 1326
1326 host->rtmin = DBL_MAX; 1327 host->rtmin = INFINITY;
1327 1328
1328 if(!list) list = cursor = host; 1329 if(!list) list = cursor = host;
1329 else cursor->next = host; 1330 else cursor->next = host;