aboutsummaryrefslogtreecommitdiff
path: root/lib/libfetch
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2008-02-08 09:48:48 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2008-02-08 09:48:48 +0000
commit340b079be05504e2f9f4a624511c4e0558158570 (patch)
tree9787b24a4c49da7ada3bb373ada6547b72863e67 /lib/libfetch
parente97f516c0943695f5a04e5c762e964beb989dd05 (diff)
downloadsrc-340b079be05504e2f9f4a624511c4e0558158570.tar.gz
src-340b079be05504e2f9f4a624511c4e0558158570.zip
Use memcpy(3) instead of the BSD-specific bcopy(3).
Submitted by: Joerg Sonnenberger <joerg@britannica.bec.de> MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=176105
Diffstat (limited to 'lib/libfetch')
-rw-r--r--lib/libfetch/common.c2
-rw-r--r--lib/libfetch/ftp.c8
-rw-r--r--lib/libfetch/http.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c
index 224656061b5d..13ebf649c053 100644
--- a/lib/libfetch/common.c
+++ b/lib/libfetch/common.c
@@ -639,7 +639,7 @@ fetch_add_entry(struct url_ent **p, int *size, int *len,
tmp = *p + *len;
snprintf(tmp->name, PATH_MAX, "%s", name);
- bcopy(us, &tmp->stat, sizeof(*us));
+ memcpy(&tmp->stat, us, sizeof(*us));
(*len)++;
(++tmp)->name[0] = 0;
diff --git a/lib/libfetch/ftp.c b/lib/libfetch/ftp.c
index 475adda87b37..d0d597f0f9e0 100644
--- a/lib/libfetch/ftp.c
+++ b/lib/libfetch/ftp.c
@@ -746,8 +746,8 @@ ftp_transfer(conn_t *conn, const char *oper, const char *file,
if (e == FTP_EPASSIVE_MODE)
sin6->sin6_port = htons(port);
else {
- bcopy(addr + 2, (char *)&sin6->sin6_addr, 16);
- bcopy(addr + 19, (char *)&sin6->sin6_port, 2);
+ memcpy(&sin6->sin6_addr, addr + 2, 16);
+ memcpy(&sin6->sin6_port, addr + 19, 2);
}
break;
case AF_INET:
@@ -755,8 +755,8 @@ ftp_transfer(conn_t *conn, const char *oper, const char *file,
if (e == FTP_EPASSIVE_MODE)
sin4->sin_port = htons(port);
else {
- bcopy(addr, (char *)&sin4->sin_addr, 4);
- bcopy(addr + 4, (char *)&sin4->sin_port, 2);
+ memcpy(&sin4->sin_addr, addr, 4);
+ memcpy(&sin4->sin_port, addr + 4, 2);
}
break;
default:
diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c
index a5499c61c256..132949e79799 100644
--- a/lib/libfetch/http.c
+++ b/lib/libfetch/http.c
@@ -265,7 +265,7 @@ http_readfn(void *v, char *buf, int len)
l = io->buflen - io->bufpos;
if (len < l)
l = len;
- bcopy(io->buf + io->bufpos, buf + pos, l);
+ memcpy(buf + pos, io->buf + io->bufpos, l);
io->bufpos += l;
}