mirror of
https://github.com/RGBCube/serenity
synced 2025-05-29 07:05:06 +00:00
AK+Kernel: Implement and use EnumBits has_any_flag()
This duplicates the old functionality of has_flag and will return true when any flags present in the mask are also in the value.
This commit is contained in:
parent
371911b1b5
commit
9715311837
3 changed files with 9 additions and 3 deletions
|
@ -96,7 +96,7 @@ Thread::FileBlocker::BlockFlags FileDescription::should_unblock(Thread::FileBloc
|
|||
unblock_flags |= BlockFlags::Write;
|
||||
// TODO: Implement Thread::FileBlocker::BlockFlags::Exception
|
||||
|
||||
if (has_flag(block_flags, BlockFlags::SocketFlags)) {
|
||||
if (has_any_flag(block_flags, BlockFlags::SocketFlags)) {
|
||||
auto* sock = socket();
|
||||
VERIFY(sock);
|
||||
if (has_flag(block_flags, BlockFlags::Accept) && sock->can_accept())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue