Apply clang-format changes

This commit is contained in:
BenceSzalai 2025-05-01 19:13:22 +02:00
parent d5a790d455
commit b78f8911a0
No known key found for this signature in database
GPG key ID: B1FC0240D2CD9A19
3 changed files with 11 additions and 10 deletions

View file

@ -134,10 +134,9 @@ int sys_execve(const char *prog, char *const argv[], char *const envp[]) {
char *buf = alloca(PATH_MAX); char *buf = alloca(PATH_MAX);
const char *name = ""; const char *name = "";
if (IsXnu()) { if (IsXnu()) {
name = "/.ape-" APE_VERSION_STR GetXnuSuffix(); name = "/.ape-" APE_VERSION_STR GetXnuSuffix();
} } else {
else { name = "/.ape-" APE_VERSION_STR;
name = "/.ape-" APE_VERSION_STR;
} }
InitExecve(); InitExecve();
RetryExecve(Join(g_execve.tmpdir, name, buf), shargs, envp); RetryExecve(Join(g_execve.tmpdir, name, buf), shargs, envp);

View file

@ -2020,8 +2020,8 @@ int main(int argc, char *argv[]) {
if (support_vector & _HOSTXNU) { if (support_vector & _HOSTXNU) {
// Add an architecture suffix to the temporary APE Loader // Add an architecture suffix to the temporary APE Loader
// name to differentiate between x86_64 and arm64. // name to differentiate between x86_64 and arm64.
p = stpcpy(p, "$([ -d /Applications ] && ( printf '-'; " p = stpcpy(p, "$([ -d /Applications ] && ( printf '-'; ( uname -m "
"( uname -m 2>/dev/null || printf 'unknown') ))"); "2>/dev/null || printf 'unknown')))");
} }
p = stpcpy(p, "\"\n" p = stpcpy(p, "\"\n"
"[ x\"$1\" != x--assimilate ] && " "[ x\"$1\" != x--assimilate ] && "

View file

@ -555,14 +555,16 @@ void ApplyFilesystemPolicy(unsigned long ipromises) {
if ((p = getenv("TMPDIR"))) { if ((p = getenv("TMPDIR"))) {
UnveilIfExists( UnveilIfExists(
__join_paths(buf, sizeof(buf), p, ".ape-" APE_VERSION_STR), "rx"); __join_paths(buf, sizeof(buf), p, ".ape-" APE_VERSION_STR), "rx");
UnveilIfExists( UnveilIfExists(__join_paths(buf, sizeof(buf), p,
__join_paths(buf, sizeof(buf), p, ".ape-" APE_VERSION_STR GetXnuSuffix()), "rx"); ".ape-" APE_VERSION_STR GetXnuSuffix()),
"rx");
} }
if ((p = getenv("HOME"))) { if ((p = getenv("HOME"))) {
UnveilIfExists( UnveilIfExists(
__join_paths(buf, sizeof(buf), p, ".ape-" APE_VERSION_STR), "rx"); __join_paths(buf, sizeof(buf), p, ".ape-" APE_VERSION_STR), "rx");
UnveilIfExists( UnveilIfExists(__join_paths(buf, sizeof(buf), p,
__join_paths(buf, sizeof(buf), p, ".ape-" APE_VERSION_STR GetXnuSuffix()), "rx"); ".ape-" APE_VERSION_STR GetXnuSuffix()),
"rx");
} }
} }
} }