diff options
| author | otto <> | 2005-03-30 20:13:52 +0000 |
|---|---|---|
| committer | otto <> | 2005-03-30 20:13:52 +0000 |
| commit | 862e6817b3f445520231811d27e5ba22fa2ed1c7 (patch) | |
| tree | a84bc4f2badc3483fb1f0e8f1911cb99ac461521 /src/lib/libc/string/bcopy.c | |
| parent | 894b6ab0099e7d9ca2ad9acb75246cd0a4542167 (diff) | |
| download | openbsd-862e6817b3f445520231811d27e5ba22fa2ed1c7.tar.gz openbsd-862e6817b3f445520231811d27e5ba22fa2ed1c7.tar.bz2 openbsd-862e6817b3f445520231811d27e5ba22fa2ed1c7.zip | |
ansify + deregister. no binary change on i386. ok deraadt@ pat@ moritz@
Diffstat (limited to 'src/lib/libc/string/bcopy.c')
| -rw-r--r-- | src/lib/libc/string/bcopy.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/lib/libc/string/bcopy.c b/src/lib/libc/string/bcopy.c index c48faa145e..7b30ab4abb 100644 --- a/src/lib/libc/string/bcopy.c +++ b/src/lib/libc/string/bcopy.c | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | */ | 31 | */ |
| 32 | 32 | ||
| 33 | #if defined(LIBC_SCCS) && !defined(lint) | 33 | #if defined(LIBC_SCCS) && !defined(lint) |
| 34 | static char *rcsid = "$OpenBSD: bcopy.c,v 1.3 2003/06/02 20:18:38 millert Exp $"; | 34 | static char *rcsid = "$OpenBSD: bcopy.c,v 1.4 2005/03/30 20:13:52 otto Exp $"; |
| 35 | #endif /* LIBC_SCCS and not lint */ | 35 | #endif /* LIBC_SCCS and not lint */ |
| 36 | 36 | ||
| 37 | #include <string.h> | 37 | #include <string.h> |
| @@ -52,23 +52,20 @@ typedef long word; /* "word" used for optimal copy speed */ | |||
| 52 | */ | 52 | */ |
| 53 | #ifdef MEMCOPY | 53 | #ifdef MEMCOPY |
| 54 | void * | 54 | void * |
| 55 | memcpy(dst0, src0, length) | 55 | memcpy(void *dst0, const void *src0, size_t length) |
| 56 | #else | 56 | #else |
| 57 | #ifdef MEMMOVE | 57 | #ifdef MEMMOVE |
| 58 | void * | 58 | void * |
| 59 | memmove(dst0, src0, length) | 59 | memmove(void *dst0, const void *src0, size_t length) |
| 60 | #else | 60 | #else |
| 61 | void | 61 | void |
| 62 | bcopy(src0, dst0, length) | 62 | bcopy(const void *src0, void *dst0, size_t length) |
| 63 | #endif | 63 | #endif |
| 64 | #endif | 64 | #endif |
| 65 | void *dst0; | ||
| 66 | const void *src0; | ||
| 67 | register size_t length; | ||
| 68 | { | 65 | { |
| 69 | register char *dst = dst0; | 66 | char *dst = dst0; |
| 70 | register const char *src = src0; | 67 | const char *src = src0; |
| 71 | register size_t t; | 68 | size_t t; |
| 72 | 69 | ||
| 73 | if (length == 0 || dst == src) /* nothing to do */ | 70 | if (length == 0 || dst == src) /* nothing to do */ |
| 74 | goto done; | 71 | goto done; |
