aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2015-11-29 08:38:59 +0100
committerDmitry Vyukov <dvyukov@google.com>2015-11-29 08:38:59 +0100
commitd46a9039a595fb8050e785a25726ae18f389cab0 (patch)
tree38db2298fc5815ccb33faea552bf37077f324f81 /executor
parentbb158eaeab38df96259c6b5b8360f1d8c102e166 (diff)
executor: fix build
Diffstat (limited to 'executor')
-rw-r--r--executor/executor.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/executor/executor.cc b/executor/executor.cc
index 50c76b356..614ecae49 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -1,7 +1,6 @@
// Copyright 2015 syzkaller project authors. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
-#include "syscalls.h"
#include <algorithm>
#include <errno.h>
#include <fcntl.h>
@@ -26,6 +25,8 @@
#include <time.h>
#include <unistd.h>
+#include "syscalls.h"
+
const int kInFd = 3;
const int kOutFd = 4;
const int kInPipeFd = 5;
@@ -294,8 +295,7 @@ retry:
if (collide && (n % 2)) {
// Don't wait for every other call.
// We already have results from the previous execution.
- }
- else if (flag_threaded) {
+ } else if (flag_threaded) {
// Wait for call completion.
uint64_t start = current_time_ms();
uint64_t now = start;
@@ -326,8 +326,7 @@ retry:
handle_completion(th);
}
}
- }
- else {
+ } else {
// Execute directly.
if (th != &threads[0])
fail("using non-main thread in non-thread mode");
@@ -475,8 +474,7 @@ void execute_call(thread_t* th)
char buf[128];
sprintf(buf, "/dev/pts/%d", ptyno);
th->res = open(buf, th->args[1], 0);
- }
- else {
+ } else {
th->res = -1;
}
}