summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-11-27 08:38:12 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-11-27 14:35:20 +0900
commit2940b128264f70923e5832a67dede8ed5ef883a5 (patch)
tree3f81551056ee81c8a17f3ce5ea76395d370d133c
parent614f57ed765019f4c431817d17267dbe77151b56 (diff)
downloadsystemd-2940b128264f70923e5832a67dede8ed5ef883a5.tar.gz
test: use for(;;) instead of while(true)
-rw-r--r--src/oom/test-oomd-util.c2
1 files changed, 1 insertions, 1 deletions
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");