Skip to content

Commit e8c38bd

Browse files
authored
Update libc/src/stdlib/memalignment.cpp
1 parent 203ce17 commit e8c38bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc/src/stdlib/memalignment.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LLVM_LIBC_FUNCTION(size_t, memalignment, (const void *p)) {
99

1010
uintptr_t addr = reinterpret_cast<uintptr_t>(p);
1111

12-
return 1 << cpp::countr_zero(addr);
12+
return size_t(1) << cpp::countr_zero(addr);
1313
}
1414

1515
} // namespace LIBC_NAMESPACE_DECL

0 commit comments

Comments
 (0)