From cf6f4f6dfa9dc36a3315ee4d97d6d1bedc0c93f1 Mon Sep 17 00:00:00 2001 From: Robert Swiecki Date: Tue, 7 Jan 2025 09:42:14 +0100 Subject: [PATCH] make indent --- macros.h | 3 +-- mnt.cc | 3 +-- subproc.cc | 2 +- util.cc | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/macros.h b/macros.h index ea295ef..6ce35ba 100644 --- a/macros.h +++ b/macros.h @@ -38,7 +38,6 @@ #define ARR_SZ(array) (sizeof(array) / sizeof(*array)) #endif /* !defined(ARR_SZ) */ -#define NS_VALSTR_STRUCT(x) \ - { (uint64_t) x, #x } +#define NS_VALSTR_STRUCT(x) {(uint64_t)x, #x} #endif /* NS_COMMON_H */ diff --git a/mnt.cc b/mnt.cc index 5295c4f..c1b3780 100644 --- a/mnt.cc +++ b/mnt.cc @@ -521,8 +521,7 @@ bool initNs(nsjconf_t* nsjconf) { } int status; - while (wait4(pid, &status, 0, NULL) != pid) - ; + while (wait4(pid, &status, 0, NULL) != pid); if (WIFEXITED(status) && WEXITSTATUS(status) == 0) { return true; } diff --git a/subproc.cc b/subproc.cc index 107cb9f..b2cf3a3 100644 --- a/subproc.cc +++ b/subproc.cc @@ -219,7 +219,7 @@ static void newProc(nsjconf_t* nsjconf, int netfd, int fd_in, int fd_out, int fd if (nsjconf->use_execveat) { #if defined(__NR_execveat) - util::syscall(__NR_execveat, nsjconf->exec_fd, (uintptr_t) "", + util::syscall(__NR_execveat, nsjconf->exec_fd, (uintptr_t)"", (uintptr_t)argv.data(), (uintptr_t)environ, AT_EMPTY_PATH); #else /* defined(__NR_execveat) */ LOG_E("Your system doesn't support execveat() syscall"); diff --git a/util.cc b/util.cc index 96845e2..7f6546e 100644 --- a/util.cc +++ b/util.cc @@ -409,12 +409,12 @@ long syscall(long sysno, uintptr_t a0, uintptr_t a1, uintptr_t a2, uintptr_t a3, } long setrlimit(int res, const struct rlimit64& newlim) { - return util::syscall(__NR_prlimit64, 0, res, (uintptr_t)&newlim, (uintptr_t) nullptr); + return util::syscall(__NR_prlimit64, 0, res, (uintptr_t)&newlim, (uintptr_t)nullptr); } long getrlimit(int res, struct rlimit64* curlim) { *curlim = {}; - return util::syscall(__NR_prlimit64, 0, res, (uintptr_t) nullptr, (uintptr_t)curlim); + return util::syscall(__NR_prlimit64, 0, res, (uintptr_t)nullptr, (uintptr_t)curlim); } } // namespace util