X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fping.c;h=df2f6da6e6bc69158ebad65e8c47615cd10bfcad;hb=3b227016c5e2126d5064c19d29ab79f13a187b39;hp=216feda1f5d688fd79766822937cb75d2d3608e8;hpb=eea01a8f212634414a21462ba79dc058dc5fb304;p=collectd.git diff --git a/src/ping.c b/src/ping.c index 216feda1..df2f6da6 100644 --- a/src/ping.c +++ b/src/ping.c @@ -210,7 +210,8 @@ static int ping_dispatch_all (pingobj_t *pingobj) /* {{{ */ hl->pkg_missed++; /* if the host did not answer our last N packages, trigger a resolv. */ - if (ping_max_missed >= 0 && hl->pkg_missed >= ping_max_missed) + if ((ping_max_missed >= 0) + && (hl->pkg_missed >= ((uint32_t) ping_max_missed))) { /* {{{ */ /* we reset the missed package counter here, since we only want to * trigger a resolv every N packages and not every package _AFTER_ N @@ -359,7 +360,7 @@ static void *ping_thread (void *arg) /* {{{ */ * `ts_wait'. */ time_calc (&ts_wait, &ts_int, &tv_begin, &tv_end); - status = pthread_cond_timedwait (&ping_cond, &ping_lock, &ts_wait); + pthread_cond_timedwait (&ping_cond, &ping_lock, &ts_wait); if (ping_thread_loop <= 0) break; } /* while (ping_thread_loop > 0) */