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
This commit is contained in:
Stefan Reinauer 2008-08-19 19:18:58 +00:00 committed by Stefan Reinauer
parent 33e6d5dec6
commit 989c17810b
1 changed files with 2 additions and 1 deletions

View File

@ -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)