From 59d6b73b4b1d2b2a35ba7648ed0a18bf7b301c24 Mon Sep 17 00:00:00 2001 From: kan Date: Fri, 30 Jul 2004 00:33:09 +0000 Subject: [PATCH] Clean up local memcpy implementation to take void * parameters. --- sys/boot/i386/boot2/boot2.c | 9 ++++++--- 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 a1c46209df71..e7b9a2b9aff2 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 a1c46209df71..e7b9a2b9aff2 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