summaryrefslogtreecommitdiffstats
path: root/plugins/check_ping.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_ping.c')
-rw-r--r--plugins/check_ping.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index 0f3292d..c457ad6 100644
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
@@ -112,7 +112,7 @@ main (int argc, char **argv)
112#endif 112#endif
113 113
114 for (i = 0 ; i < n_addresses ; i++) { 114 for (i = 0 ; i < n_addresses ; i++) {
115 115
116#ifdef PING6_COMMAND 116#ifdef PING6_COMMAND
117 if (address_family != AF_INET && is_inet6_addr(addresses[i])) 117 if (address_family != AF_INET && is_inet6_addr(addresses[i]))
118 rawcmd = strdup(PING6_COMMAND); 118 rawcmd = strdup(PING6_COMMAND);
@@ -150,8 +150,8 @@ main (int argc, char **argv)
150 else if (pl >= wpl || rta >= wrta) 150 else if (pl >= wpl || rta >= wrta)
151 this_result = STATE_WARNING; 151 this_result = STATE_WARNING;
152 else if (pl >= 0 && rta >= 0) 152 else if (pl >= 0 && rta >= 0)
153 this_result = max_state (STATE_OK, this_result); 153 this_result = max_state (STATE_OK, this_result);
154 154
155 if (n_addresses > 1 && this_result != STATE_UNKNOWN) 155 if (n_addresses > 1 && this_result != STATE_UNKNOWN)
156 die (STATE_OK, "%s is alive\n", addresses[i]); 156 die (STATE_OK, "%s is alive\n", addresses[i]);
157 157
@@ -370,7 +370,7 @@ get_threshold (char *arg, float *trta, int *tpl)
370 return OK; 370 return OK;
371 else if (strpbrk (arg, ",:") && strstr (arg, "%") && sscanf (arg, "%f%*[:,]%d%%", trta, tpl) == 2) 371 else if (strpbrk (arg, ",:") && strstr (arg, "%") && sscanf (arg, "%f%*[:,]%d%%", trta, tpl) == 2)
372 return OK; 372 return OK;
373 else if (strstr (arg, "%") && sscanf (arg, "%d%%", tpl) == 1) 373 else if (strstr (arg, "%") && sscanf (arg, "%d%%", tpl) == 1)
374 return OK; 374 return OK;
375 375
376 usage2 (_("%s: Warning threshold must be integer or percentage!\n\n"), arg); 376 usage2 (_("%s: Warning threshold must be integer or percentage!\n\n"), arg);