summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/bcopy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/string/bcopy.c')
-rw-r--r--src/lib/libc/string/bcopy.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/lib/libc/string/bcopy.c b/src/lib/libc/string/bcopy.c
index 4308c6484a..fcaa843c71 100644
--- a/src/lib/libc/string/bcopy.c
+++ b/src/lib/libc/string/bcopy.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bcopy.c,v 1.5 2005/08/08 08:05:37 espie Exp $ */ 1/* $OpenBSD: bcopy.c,v 1.6 2014/11/30 19:43:56 deraadt Exp $ */
2/*- 2/*-
3 * Copyright (c) 1990 The Regents of the University of California. 3 * Copyright (c) 1990 The Regents of the University of California.
4 * All rights reserved. 4 * All rights reserved.
@@ -44,21 +44,9 @@ typedef long word; /* "word" used for optimal copy speed */
44 44
45/* 45/*
46 * Copy a block of memory, handling overlap. 46 * Copy a block of memory, handling overlap.
47 * This is the routine that actually implements
48 * (the portable versions of) bcopy, memcpy, and memmove.
49 */ 47 */
50#ifdef MEMCOPY
51void *
52memcpy(void *dst0, const void *src0, size_t length)
53#else
54#ifdef MEMMOVE
55void *
56memmove(void *dst0, const void *src0, size_t length)
57#else
58void 48void
59bcopy(const void *src0, void *dst0, size_t length) 49bcopy(const void *src0, void *dst0, size_t length)
60#endif
61#endif
62{ 50{
63 char *dst = dst0; 51 char *dst = dst0;
64 const char *src = src0; 52 const char *src = src0;
@@ -120,9 +108,5 @@ bcopy(const void *src0, void *dst0, size_t length)
120 TLOOP(*--dst = *--src); 108 TLOOP(*--dst = *--src);
121 } 109 }
122done: 110done:
123#if defined(MEMCOPY) || defined(MEMMOVE)
124 return (dst0);
125#else
126 return; 111 return;
127#endif
128} 112}