From: Ruben Kerkhof Date: Tue, 15 May 2018 07:46:01 +0000 (+0200) Subject: collectdmon: fix build failure on Xenial X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=b4a2f3eb563332d43a25791ee7856cb0817ae95e;p=collectd.git collectdmon: fix build failure on Xenial CC src/collectdmon.o src/collectdmon.c:262:44: error: comparison of unsigned expression >= 0 is always true [-Werror,-Wtautological-compare] while (((time_left = sleep(time_left)) >= 0) && loop == 0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ 1 error generated. --- diff --git a/src/collectdmon.c b/src/collectdmon.c index 59bebf00..43ff6af2 100644 --- a/src/collectdmon.c +++ b/src/collectdmon.c @@ -259,7 +259,7 @@ static void check_respawn(void) { "disabled for %i seconds", time_left); - while (((time_left = sleep(time_left)) >= 0) && loop == 0) + while (((time_left = sleep(time_left)) > 0) && loop == 0) ; } return;