make indent
authorRobert Swiecki <robert@swiecki.net>
Wed, 26 Aug 2020 14:09:55 +0000 (16:09 +0200)
committerRobert Swiecki <robert@swiecki.net>
Wed, 26 Aug 2020 14:09:55 +0000 (16:09 +0200)
macros.h
nsjail.cc
subproc.cc
user.cc

index d29b03b940ac5ee5c5ebd390347be727422e7da3..c86735c008f09729495b0051e30e451f010dcc7f 100644 (file)
--- 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;                                  \
        }))
index 06acf9c5f98a1d898bebbdaa9bfe0d4ec229f358..8d57b8637c1e6b0cc122bcef0b7a425d5cc243b0 100644 (file)
--- 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<int, int, const char*> 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;
index 3c6bea9a6a7dc49b185eaac5e0fed14229b5caea..2f1c5cd03f33f388cb02bad4c3ddb288b4213e74 100644 (file)
@@ -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 a335e2d20017c9d8ac3bc25ea3161bb946c0279d..d6264dd8d37915672e739a62a9b22821dcc012e5 100644 (file)
--- 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;