File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
libc/src/__support/OSUtil/linux Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1212#include " src/__support/CPP/bit.h"
1313#include " src/__support/common.h"
1414#include " src/__support/macros/config.h"
15+ #include " src/__support/macros/optimization.h"
1516#include " src/__support/macros/properties/architectures.h"
1617
1718#ifdef LIBC_TARGET_ARCH_IS_X86_32
@@ -43,8 +44,7 @@ LIBC_INLINE_VAR constexpr unsigned long MAX_ERRNO = 4095;
4344template <typename PointerLike>
4445LIBC_INLINE constexpr bool is_valid_mmap (PointerLike ptr) {
4546 long addr = cpp::bit_cast<long >(ptr);
46- return __builtin_expect (addr > 0 || addr < -cpp::bit_cast<long >(MAX_ERRNO),
47- true );
47+ return LIBC_LIKELY (addr > 0 || addr < -static_cast <long >(MAX_ERRNO));
4848}
4949} // namespace linux_utils
5050
You can’t perform that action at this time.
0 commit comments