summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2008-08-19 19:18:58 +0000
committerStefan Reinauer <stepan@openbios.org>2008-08-19 19:18:58 +0000
commit989c17810b9a8b3ac9fe848aa71d105875f025b9 (patch)
tree6111846d220debb5326f6c92abaef52c5b5cbd1a /payloads
parent33e6d5dec6ef92947ba0c9d6a5197b1869cf89f8 (diff)
downloadcoreboot-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')
-rw-r--r--payloads/libpayload/libc/memory.c3
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)