xiaoxiang781216 commented on code in PR #21033:
URL: https://github.com/apache/nuttx/pull/21033#discussion_r4386892995
##########
libs/libc/string/lib_memcpy.c:
##########
@@ -43,8 +44,41 @@
no_builtin("memcpy")
FAR void *memcpy(FAR void *dest, FAR const void *src, size_t n)
{
- FAR unsigned char *pout = (FAR unsigned char *)dest;
- FAR unsigned char *pin = (FAR unsigned char *)src;
+ FAR uint8_t *pout = (FAR uint8_t *)dest;
+ FAR const uint8_t *pin = (FAR const uint8_t *)src;
+
+ if (!TOO_SMALL4(n) && !(((uintptr_t)pout ^ (uintptr_t)pin) & 3))
Review Comment:
https://github.com/apache/nuttx/blob/master/libs/libc/string/lib_bsdmemcpy.c#L58
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]