diff options
author | kan <kan@FreeBSD.org> | 2004-07-30 00:33:09 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2004-07-30 00:33:09 +0000 |
commit | 59d6b73b4b1d2b2a35ba7648ed0a18bf7b301c24 (patch) | |
tree | 1380626aac95c5853cf1563cdedf872cee3f8b00 /sys/boot/i386 | |
parent | 2ba123c4be1ea117b8bf7495975c84c64606d882 (diff) | |
download | FreeBSD-src-59d6b73b4b1d2b2a35ba7648ed0a18bf7b301c24.zip FreeBSD-src-59d6b73b4b1d2b2a35ba7648ed0a18bf7b301c24.tar.gz |
Clean up local memcpy implementation to take void * parameters.
Diffstat (limited to 'sys/boot/i386')
-rw-r--r-- | sys/boot/i386/boot2/boot2.c | 9 | ||||
-rw-r--r-- | sys/boot/i386/gptboot/gptboot.c | 9 |
2 files changed, 12 insertions, 6 deletions
diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c index a1c4620..e7b9a2b 100644 --- a/sys/boot/i386/boot2/boot2.c +++ b/sys/boot/i386/boot2/boot2.c @@ -139,12 +139,15 @@ static int xputc(int); static int xgetc(int); static int getc(int); -static void memcpy(char *, const char *, int); +static void memcpy(void *, const void *, int); static void -memcpy(char *dst, const char *src, int len) +memcpy(void *dst, const void *src, int len) { + const char *s = src; + char *d = dst; + while (len--) - *dst++ = *src++; + *d++ = *s++; } static inline int diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c index a1c4620..e7b9a2b 100644 --- a/sys/boot/i386/gptboot/gptboot.c +++ b/sys/boot/i386/gptboot/gptboot.c @@ -139,12 +139,15 @@ static int xputc(int); static int xgetc(int); static int getc(int); -static void memcpy(char *, const char *, int); +static void memcpy(void *, const void *, int); static void -memcpy(char *dst, const char *src, int len) +memcpy(void *dst, const void *src, int len) { + const char *s = src; + char *d = dst; + while (len--) - *dst++ = *src++; + *d++ = *s++; } static inline int |