From fc02a3911c798a8b1d86ea0629a732a41c108c2a Mon Sep 17 00:00:00 2001 From: Robert Swiecki Date: Wed, 26 Aug 2020 16:09:55 +0200 Subject: [PATCH] make indent --- macros.h | 3 +-- nsjail.cc | 4 ++-- subproc.cc | 2 +- user.cc | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/macros.h b/macros.h index d29b03b..c86735c 100644 --- a/macros.h +++ b/macros.h @@ -28,8 +28,7 @@ #define TEMP_FAILURE_RETRY(expression) \ (__extension__({ \ long int __result; \ - do \ - __result = (long int)(expression); \ + do __result = (long int)(expression); \ while (__result == -1L && errno == EINTR); \ __result; \ })) diff --git a/nsjail.cc b/nsjail.cc index 06acf9c..8d57b86 100644 --- a/nsjail.cc +++ b/nsjail.cc @@ -166,8 +166,8 @@ static bool pipeTraffic(nsjconf_t* nsjconf, int listenfd) { const char* direction; bool closed = false; std::tuple direction_map[] = { - std::make_tuple(i, i + 1, "in"), - std::make_tuple(i + 2, i, "out"), + std::make_tuple(i, i + 1, "in"), + std::make_tuple(i + 2, i, "out"), }; for (const auto& entry : direction_map) { std::tie(in, out, direction) = entry; diff --git a/subproc.cc b/subproc.cc index 3c6bea9..2f1c5cd 100644 --- a/subproc.cc +++ b/subproc.cc @@ -194,7 +194,7 @@ static void subprocNewProc( #if defined(__NR_execveat) util::syscall(__NR_execveat, nsjconf->exec_fd, (uintptr_t) "", (uintptr_t)argv.data(), (uintptr_t)environ, AT_EMPTY_PATH); -#else /* defined(__NR_execveat) */ +#else /* defined(__NR_execveat) */ LOG_E("Your system doesn't support execveat() syscall"); return; #endif /* defined(__NR_execveat) */ diff --git a/user.cc b/user.cc index a335e2d..d6264dd 100644 --- a/user.cc +++ b/user.cc @@ -68,7 +68,7 @@ static bool setResGid(gid_t gid) { PLOG_W("setresgid32(%d)", (int)gid); return false; } -#else /* defined(__NR_setresgid32) */ +#else /* defined(__NR_setresgid32) */ if (util::syscall(__NR_setresgid, (uintptr_t)gid, (uintptr_t)gid, (uintptr_t)gid) == -1) { PLOG_W("setresgid(%d)", gid); return false; @@ -84,7 +84,7 @@ static bool setResUid(uid_t uid) { PLOG_W("setresuid32(%d)", (int)uid); return false; } -#else /* defined(__NR_setresuid32) */ +#else /* defined(__NR_setresuid32) */ if (util::syscall(__NR_setresuid, (uintptr_t)uid, (uintptr_t)uid, (uintptr_t)uid) == -1) { PLOG_W("setresuid(%d)", uid); return false; -- 2.34.1