From a53036dba53fb4358186c5293341df5ede516026 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Tue, 10 Aug 2004 15:18:18 +0000 Subject: Forgot _dl_memcpy in previous checkin. --- ldso/include/dl-string.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ldso/include/dl-string.h b/ldso/include/dl-string.h index 0b313e73f..3e14971e6 100644 --- a/ldso/include/dl-string.h +++ b/ldso/include/dl-string.h @@ -135,12 +135,13 @@ static inline char *_dl_strstr(const char *s1, const char *s2) static inline void * _dl_memcpy(void * dst, const void * src, size_t len) { - register char *a = dst; - register const char *b = src; - - while (len--) - *a++ = *b++; + register char *a = dst-1; + register const char *b = src-1; + while (len) { + *++a = *++b; + --len; + } return dst; } -- cgit v1.2.3