From c81b0ef31cdd4c2449a750a060085bab972bbd05 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 4 Oct 2021 11:57:47 +0200 Subject: executor: work around clang-format issue clang-format mis-formats #elif: https://bugs.llvm.org/show_bug.cgi?id=48664 and then clang fails with: error: misleading indentation; statement is not part of the previous 'if' Split #elif into nested #if/else. --- executor/common.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'executor') diff --git a/executor/common.h b/executor/common.h index d9367fd38..7a36cfe8d 100644 --- a/executor/common.h +++ b/executor/common.h @@ -661,7 +661,8 @@ static void loop(void) if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) break; sleep_ms(1); -#if SYZ_EXECUTOR && SYZ_EXECUTOR_USES_SHMEM +#if SYZ_EXECUTOR +#if SYZ_EXECUTOR_USES_SHMEM // Even though the test process executes exit at the end // and execution time of each syscall is bounded by syscall_timeout_ms (~50ms), // this backup watchdog is necessary and its performance is important. @@ -684,12 +685,13 @@ static void loop(void) if ((now - start < program_timeout_ms) && (now - start < min_timeout_ms || now - last_executed < inactive_timeout_ms)) continue; -#elif SYZ_EXECUTOR +#else if (current_time_ms() - start < program_timeout_ms) continue; +#endif #else - if (current_time_ms() - start < /*{{{PROGRAM_TIMEOUT_MS}}}*/) - continue; + if (current_time_ms() - start < /*{{{PROGRAM_TIMEOUT_MS}}}*/) + continue; #endif debug("killing hanging pid %d\n", pid); kill_and_wait(pid, &status); -- cgit mrf-deployment