Skip to content

Commit

Permalink
make indent
Browse files Browse the repository at this point in the history
  • Loading branch information
robertswiecki committed Jan 7, 2025
1 parent bc30a1a commit cf6f4f6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
3 changes: 1 addition & 2 deletions mnt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion subproc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit cf6f4f6

Please sign in to comment.