projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Early expression evaluation
[deliverable/binutils-gdb.git]
/
libiberty
/
bcopy.c
diff --git
a/libiberty/bcopy.c
b/libiberty/bcopy.c
index 70fa7e328cc68f558c638493c4c537621b8a088b..f9b7a8acd5c72bbd870789f44124135bad5a06ab 100644
(file)
--- a/
libiberty/bcopy.c
+++ b/
libiberty/bcopy.c
@@
-9,19
+9,23
@@
Copies @var{length} bytes from memory region @var{in} to region
*/
*/
+#include <stddef.h>
+
void
void
-bcopy (src, dest, len)
- register char *src, *dest;
- int len;
+bcopy (const void *src, void *dest, size_t len)
{
if (dest < src)
{
if (dest < src)
- while (len--)
- *dest++ = *src++;
+ {
+ const char *firsts = (const char *) src;
+ char *firstd = (char *) dest;
+ while (len--)
+ *firstd++ = *firsts++;
+ }
else
{
else
{
- c
har *lasts =
src + (len-1);
- char *lastd = dest + (len-1);
+ c
onst char *lasts = (const char *)
src + (len-1);
+ char *lastd =
(char *)
dest + (len-1);
while (len--)
while (len--)
- *
(char *)lastd-- = *(char *)
lasts--;
+ *
lastd-- = *
lasts--;
}
}
}
}
This page took
0.025887 seconds
and
4
git commands to generate.