clang-format

This commit is contained in:
Gavin Hayes 2023-02-24 10:48:00 -05:00
parent 8b5a6ad642
commit 2c9e197843
2 changed files with 8 additions and 6 deletions

View file

@ -78,7 +78,8 @@ int sys_execve(const char *prog, char *const argv[], char *const envp[]) {
char **shargs; char **shargs;
const char *ape; const char *ape;
struct ZiposUri uri; struct ZiposUri uri;
if (_weaken(__zipos_parseuri) && (_weaken(__zipos_parseuri)(prog, &uri) != -1)) { if (_weaken(__zipos_parseuri) &&
(_weaken(__zipos_parseuri)(prog, &uri) != -1)) {
rc = _weaken(__zipos_open)(&uri, O_RDONLY | O_CLOEXEC, 0); rc = _weaken(__zipos_open)(&uri, O_RDONLY | O_CLOEXEC, 0);
if (rc != -1) { if (rc != -1) {
const int zipFD = rc; const int zipFD = rc;

View file

@ -183,16 +183,17 @@ int fexecve(int fd, char *const argv[], char *const envp[]) {
STRACE("fexecve(%d, %s, %s) → ...", fd, DescribeStringList(argv), STRACE("fexecve(%d, %s, %s) → ...", fd, DescribeStringList(argv),
DescribeStringList(envp)); DescribeStringList(envp));
do { do {
if(!IsLinux() && !IsFreebsd()) { if (!IsLinux() && !IsFreebsd()) {
rc = enosys(); rc = enosys();
break; break;
} }
if(!__isfdkind(fd, kFdZip)) { if (!__isfdkind(fd, kFdZip)) {
bool memfdReq; bool memfdReq;
BEGIN_CANCELLATION_POINT; BEGIN_CANCELLATION_POINT;
BLOCK_SIGNALS; BLOCK_SIGNALS;
strace_enabled(-1); strace_enabled(-1);
memfdReq = ((rc = fcntl(fd, F_GETFD)) != -1) && (rc & FD_CLOEXEC) && IsAPEFd(fd); memfdReq = ((rc = fcntl(fd, F_GETFD)) != -1) && (rc & FD_CLOEXEC) &&
IsAPEFd(fd);
strace_enabled(+1); strace_enabled(+1);
ALLOW_SIGNALS; ALLOW_SIGNALS;
END_CANCELLATION_POINT; END_CANCELLATION_POINT;