From caa8bd6423e2d0d1b4e72c150e80b9c6a9e1b7fe Mon Sep 17 00:00:00 2001 From: Thomas Guyot-Sionnest Date: Wed, 19 Nov 2008 06:45:18 +0000 Subject: Bulk EOL cleanup $ git diff --ignore-space-change|diffstat 0 files changed git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2087 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/check_ping.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/check_ping.c') diff --git a/plugins/check_ping.c b/plugins/check_ping.c index 0f3292d0..c457ad64 100644 --- a/plugins/check_ping.c +++ b/plugins/check_ping.c @@ -112,7 +112,7 @@ main (int argc, char **argv) #endif for (i = 0 ; i < n_addresses ; i++) { - + #ifdef PING6_COMMAND if (address_family != AF_INET && is_inet6_addr(addresses[i])) rawcmd = strdup(PING6_COMMAND); @@ -150,8 +150,8 @@ main (int argc, char **argv) else if (pl >= wpl || rta >= wrta) this_result = STATE_WARNING; else if (pl >= 0 && rta >= 0) - this_result = max_state (STATE_OK, this_result); - + this_result = max_state (STATE_OK, this_result); + if (n_addresses > 1 && this_result != STATE_UNKNOWN) die (STATE_OK, "%s is alive\n", addresses[i]); @@ -370,7 +370,7 @@ get_threshold (char *arg, float *trta, int *tpl) return OK; else if (strpbrk (arg, ",:") && strstr (arg, "%") && sscanf (arg, "%f%*[:,]%d%%", trta, tpl) == 2) return OK; - else if (strstr (arg, "%") && sscanf (arg, "%d%%", tpl) == 1) + else if (strstr (arg, "%") && sscanf (arg, "%d%%", tpl) == 1) return OK; usage2 (_("%s: Warning threshold must be integer or percentage!\n\n"), arg); -- cgit v1.2.3