summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 203fc28)
raw | patch | inline | side by side (parent: 203fc28)
author | Stefan Völkel <bd@bc-bd.org> | |
Wed, 9 Dec 2009 18:42:40 +0000 (19:42 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Wed, 9 Dec 2009 18:47:15 +0000 (19:47 +0100) |
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/ping.c | patch | blob | history |
diff --git a/src/ping.c b/src/ping.c
index 927838007a2cffc856640ab7d9fe4bfbbf08af80..e1540c37d94ca9321a4088c841f9b5c1673e56c7 100644 (file)
--- a/src/ping.c
+++ b/src/ping.c
struct timespec ts_int;
hostlist_t *hl;
- int status;
+ int count;
pthread_mutex_lock (&ping_lock);
ping_setopt (pingobj, PING_OPT_TTL, (void *) &ping_ttl);
/* Add all the hosts to the ping object. */
- status = 0;
+ count = 0;
for (hl = hostlist_head; hl != NULL; hl = hl->next)
{
- int tmp_status;
- tmp_status = ping_host_add (pingobj, hl->host);
- if (tmp_status != 0)
+ int status;
+ status = ping_host_add (pingobj, hl->host);
+ if (status != 0)
WARNING ("ping plugin: ping_host_add (%s) failed.", hl->host);
else
- status++;
+ count++;
}
- if (status == 0)
+ if (count == 0)
{
ERROR ("ping plugin: No host could be added to ping object. Giving up.");
ping_thread_error = 1;