aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common.h
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2021-10-01 16:01:47 +0200
committerDmitry Vyukov <dvyukov@google.com>2021-10-01 16:38:35 +0200
commitcc80db955d0551c2456692da6176530dd27e08ed (patch)
tree52eb201e3fb5af9168db095fbd5fcebaf2961d9d /executor/common.h
parent1d849ab4d892af13a249f75628790b47e42b7c74 (diff)
executor: check for single-line compound statements
Historically the code base does not use single-line compound statements ({} around single-line blocks). But there are few precedents creeped into already. Add a check to keep the code base consistent.
Diffstat (limited to 'executor/common.h')
-rw-r--r--executor/common.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/executor/common.h b/executor/common.h
index 3c817a7e8..d9367fd38 100644
--- a/executor/common.h
+++ b/executor/common.h
@@ -102,9 +102,8 @@ static void segv_handler(int sig, siginfo_t* info, void* ctx)
// address of the faulting instruction rather than zero as other
// operating systems seem to do. However, such faults should always be
// ignored.
- if (sig == SIGBUS) {
+ if (sig == SIGBUS)
valid = 1;
- }
#endif
if (skip && valid) {
debug("SIGSEGV on %p, skipping\n", (void*)addr);
@@ -689,9 +688,8 @@ static void loop(void)
if (current_time_ms() - start < program_timeout_ms)
continue;
#else
- if (current_time_ms() - start < /*{{{PROGRAM_TIMEOUT_MS}}}*/) {
+ if (current_time_ms() - start < /*{{{PROGRAM_TIMEOUT_MS}}}*/)
continue;
- }
#endif
debug("killing hanging pid %d\n", pid);
kill_and_wait(pid, &status);