[libc-commits] [libc] [libc] Expand usage of libc null checks. (PR #116262)
Aly ElAshram via libc-commits
libc-commits at lists.llvm.org
Wed Jun 4 06:33:27 PDT 2025
================
@@ -18,6 +19,10 @@ namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(void *, mempcpy,
(void *__restrict dst, const void *__restrict src,
size_t count)) {
+ if (count) {
----------------
AlyElashram wrote:
I added a count check here , for consistency with memcpy and also since memcpy and mempcpy are well behaved at n = 0
@lntue
https://github.com/llvm/llvm-project/pull/116262
More information about the libc-commits
mailing list