Skip to content

Commit

Permalink
Merge pull request #926 from Dennisbonke/master
Browse files Browse the repository at this point in the history
sysdeps/managarm: Fix the type_mask and the flags_mask
  • Loading branch information
qookei authored Oct 8, 2023
2 parents ee275a8 + a88cd5c commit feb6707
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sysdeps/managarm/generic/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -744,8 +744,8 @@ int sys_tcdrain(int) {
}

int sys_socket(int domain, int type_and_flags, int proto, int *fd) {
constexpr int type_mask = int(0xFFFF);
constexpr int flags_mask = ~int(0xFFFF);
constexpr int type_mask = int(0xF);
constexpr int flags_mask = ~int(0xF);
__ensure(!((type_and_flags & flags_mask) & ~(SOCK_CLOEXEC | SOCK_NONBLOCK)));

SignalGuard sguard;
Expand Down Expand Up @@ -807,8 +807,8 @@ int sys_pipe(int *fds, int flags) {
}

int sys_socketpair(int domain, int type_and_flags, int proto, int *fds) {
constexpr int type_mask = int(0xFFFF);
constexpr int flags_mask = ~int(0xFFFF);
constexpr int type_mask = int(0xF);
constexpr int flags_mask = ~int(0xF);
__ensure(!((type_and_flags & flags_mask) & ~(SOCK_CLOEXEC | SOCK_NONBLOCK)));

SignalGuard sguard;
Expand Down

0 comments on commit feb6707

Please sign in to comment.