From 2940b128264f70923e5832a67dede8ed5ef883a5 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 27 Nov 2020 08:38:12 +0900 Subject: [PATCH] test: use for(;;) instead of while(true) --- src/oom/test-oomd-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/oom/test-oomd-util.c b/src/oom/test-oomd-util.c index 5df57107f9..8143408902 100644 --- a/src/oom/test-oomd-util.c +++ b/src/oom/test-oomd-util.c @@ -23,7 +23,7 @@ static int fork_and_sleep(unsigned sleep_min) { if (pid == 0) { timeout = sleep_min * USEC_PER_MINUTE; ts = now(CLOCK_MONOTONIC); - while (true) { + for (;;) { n = now(CLOCK_MONOTONIC); if (ts + timeout < n) { log_error("Child timed out waiting to be killed");