mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-23 11:18:54 +00:00
Clean up local memcpy implementation to take void * parameters.
This commit is contained in:
parent
752448ce84
commit
1bc32c1ffc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=132864
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user