diff options
Diffstat (limited to 'src/lib/libc/string/bcopy.c')
| -rw-r--r-- | src/lib/libc/string/bcopy.c | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/src/lib/libc/string/bcopy.c b/src/lib/libc/string/bcopy.c index 92feed66ea..4308c6484a 100644 --- a/src/lib/libc/string/bcopy.c +++ b/src/lib/libc/string/bcopy.c | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | /* $OpenBSD: bcopy.c,v 1.5 2005/08/08 08:05:37 espie Exp $ */ | ||
| 1 | /*- | 2 | /*- |
| 2 | * Copyright (c) 1990 The Regents of the University of California. | 3 | * Copyright (c) 1990 The Regents of the University of California. |
| 3 | * All rights reserved. | 4 | * All rights reserved. |
| @@ -13,11 +14,7 @@ | |||
| 13 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright |
| 14 | * notice, this list of conditions and the following disclaimer in the | 15 | * notice, this list of conditions and the following disclaimer in the |
| 15 | * documentation and/or other materials provided with the distribution. | 16 | * documentation and/or other materials provided with the distribution. |
| 16 | * 3. All advertising materials mentioning features or use of this software | 17 | * 3. Neither the name of the University nor the names of its contributors |
| 17 | * must display the following acknowledgement: | ||
| 18 | * This product includes software developed by the University of | ||
| 19 | * California, Berkeley and its contributors. | ||
| 20 | * 4. Neither the name of the University nor the names of its contributors | ||
| 21 | * may be used to endorse or promote products derived from this software | 18 | * may be used to endorse or promote products derived from this software |
| 22 | * without specific prior written permission. | 19 | * without specific prior written permission. |
| 23 | * | 20 | * |
| @@ -34,11 +31,6 @@ | |||
| 34 | * SUCH DAMAGE. | 31 | * SUCH DAMAGE. |
| 35 | */ | 32 | */ |
| 36 | 33 | ||
| 37 | #if defined(LIBC_SCCS) && !defined(lint) | ||
| 38 | /*static char *sccsid = "from: @(#)bcopy.c 5.11 (Berkeley) 6/21/91";*/ | ||
| 39 | static char *rcsid = "$Id: bcopy.c,v 1.1.1.1 1995/10/18 08:42:20 deraadt Exp $"; | ||
| 40 | #endif /* LIBC_SCCS and not lint */ | ||
| 41 | |||
| 42 | #include <string.h> | 34 | #include <string.h> |
| 43 | 35 | ||
| 44 | /* | 36 | /* |
| @@ -57,23 +49,20 @@ typedef long word; /* "word" used for optimal copy speed */ | |||
| 57 | */ | 49 | */ |
| 58 | #ifdef MEMCOPY | 50 | #ifdef MEMCOPY |
| 59 | void * | 51 | void * |
| 60 | memcpy(dst0, src0, length) | 52 | memcpy(void *dst0, const void *src0, size_t length) |
| 61 | #else | 53 | #else |
| 62 | #ifdef MEMMOVE | 54 | #ifdef MEMMOVE |
| 63 | void * | 55 | void * |
| 64 | memmove(dst0, src0, length) | 56 | memmove(void *dst0, const void *src0, size_t length) |
| 65 | #else | 57 | #else |
| 66 | void | 58 | void |
| 67 | bcopy(src0, dst0, length) | 59 | bcopy(const void *src0, void *dst0, size_t length) |
| 68 | #endif | 60 | #endif |
| 69 | #endif | 61 | #endif |
| 70 | void *dst0; | ||
| 71 | const void *src0; | ||
| 72 | register size_t length; | ||
| 73 | { | 62 | { |
| 74 | register char *dst = dst0; | 63 | char *dst = dst0; |
| 75 | register const char *src = src0; | 64 | const char *src = src0; |
| 76 | register size_t t; | 65 | size_t t; |
| 77 | 66 | ||
| 78 | if (length == 0 || dst == src) /* nothing to do */ | 67 | if (length == 0 || dst == src) /* nothing to do */ |
| 79 | goto done; | 68 | goto done; |
