diff options
Diffstat (limited to 'arch/x86/lib')
-rw-r--r-- | arch/x86/lib/memcpy_32.c | 4 | ||||
-rw-r--r-- | arch/x86/lib/memmove_64.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/lib/memcpy_32.c b/arch/x86/lib/memcpy_32.c index 8ac51b82a63..37756b6fb32 100644 --- a/arch/x86/lib/memcpy_32.c +++ b/arch/x86/lib/memcpy_32.c @@ -34,8 +34,8 @@ void *memmove(void *dest, const void *src, size_t n) "cld" : "=&c" (d0), "=&S" (d1), "=&D" (d2) :"0" (n), - "1" (n-1+(const char *)src), - "2" (n-1+(char *)dest) + "1" (n-1+src), + "2" (n-1+dest) :"memory"); } return dest; diff --git a/arch/x86/lib/memmove_64.c b/arch/x86/lib/memmove_64.c index 751ebae8ec4..80175e47b19 100644 --- a/arch/x86/lib/memmove_64.c +++ b/arch/x86/lib/memmove_64.c @@ -11,8 +11,8 @@ void *memmove(void * dest,const void *src,size_t count) if (dest < src) { return memcpy(dest,src,count); } else { - char *p = (char *) dest + count; - char *s = (char *) src + count; + char *p = dest + count; + const char *s = src + count; while (count--) *--p = *--s; } |