diff --git a/libc/src/string/memory_utils/utils.h b/libc/src/string/memory_utils/utils.h index f70880ee853d3..9c293185a2e9f 100644 --- a/libc/src/string/memory_utils/utils.h +++ b/libc/src/string/memory_utils/utils.h @@ -341,9 +341,9 @@ void align_p1_to_next_boundary(T1 *__restrict &p1, T2 *__restrict &p2, } // Same as align_p1_to_next_boundary above but with a single pointer instead. -template -LIBC_INLINE void align_to_next_boundary(T1 *&p1, size_t &count) { - CPtr dummy; +template +LIBC_INLINE void align_to_next_boundary(T *&p1, size_t &count) { + const T *dummy = p1; align_p1_to_next_boundary(p1, dummy, count); }