]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: use for(;;) instead of while(true)
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 26 Nov 2020 23:38:12 +0000 (08:38 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 27 Nov 2020 05:35:20 +0000 (14:35 +0900)
src/oom/test-oomd-util.c

index 5df57107f9cdde9167d2d7ccfef616547d9c784a..8143408902b97d8d42d041708b889e5267832a73 100644 (file)
@@ -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");