diff --git a/libcxx/src/memory.cpp b/libcxx/src/memory.cpp --- a/libcxx/src/memory.cpp +++ b/libcxx/src/memory.cpp @@ -194,7 +194,7 @@ if (size <= space) { char* p1 = static_cast(ptr); - char* p2 = reinterpret_cast(reinterpret_cast(p1 + (alignment - 1)) & -alignment); + char* p2 = reinterpret_cast(reinterpret_cast(p1 + (alignment - 1)) & -alignment); size_t d = static_cast(p2 - p1); if (d <= space - size) {