diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2008-08-19 19:18:58 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2008-08-19 19:18:58 +0000 |
commit | 989c17810b9a8b3ac9fe848aa71d105875f025b9 (patch) | |
tree | 6111846d220debb5326f6c92abaef52c5b5cbd1a /payloads/libpayload/libc/memory.c | |
parent | 33e6d5dec6ef92947ba0c9d6a5197b1869cf89f8 (diff) | |
download | coreboot-989c17810b9a8b3ac9fe848aa71d105875f025b9.tar.xz |
trivial fix for memcpy return code in case someone uses it.
Thanks to Ulf Jordan for figuring this out!
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3527 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload/libc/memory.c')
-rw-r--r-- | payloads/libpayload/libc/memory.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/payloads/libpayload/libc/memory.c b/payloads/libpayload/libc/memory.c index bf1f99b212..afc38cb263 100644 --- a/payloads/libpayload/libc/memory.c +++ b/payloads/libpayload/libc/memory.c @@ -46,6 +46,7 @@ void *memset(void *s, int c, size_t n) void *memcpy(void *dst, const void *src, size_t n) { int i; + void *ret = dst; for(i = 0; i < n % sizeof(unsigned long); i++) ((unsigned char *) dst)[i] = ((unsigned char *) src)[i]; @@ -57,7 +58,7 @@ void *memcpy(void *dst, const void *src, size_t n) for(i = 0; i < n / sizeof(unsigned long); i++) ((unsigned long *) dst)[i] = ((unsigned long *) src)[i]; - return dst; + return ret; } void *memmove(void *dst, const void *src, size_t n) |