Use memcpy(3) instead of the BSD-specific bcopy(3).
Submitted by: Joerg Sonnenberger <joerg@britannica.bec.de> MFC after: 2 weeks
This commit is contained in:
parent
1de1bb1bc6
commit
ff0eb6dba4
@ -639,7 +639,7 @@ fetch_add_entry(struct url_ent **p, int *size, int *len,
|
|||||||
|
|
||||||
tmp = *p + *len;
|
tmp = *p + *len;
|
||||||
snprintf(tmp->name, PATH_MAX, "%s", name);
|
snprintf(tmp->name, PATH_MAX, "%s", name);
|
||||||
bcopy(us, &tmp->stat, sizeof(*us));
|
memcpy(&tmp->stat, us, sizeof(*us));
|
||||||
|
|
||||||
(*len)++;
|
(*len)++;
|
||||||
(++tmp)->name[0] = 0;
|
(++tmp)->name[0] = 0;
|
||||||
|
@ -746,8 +746,8 @@ ftp_transfer(conn_t *conn, const char *oper, const char *file,
|
|||||||
if (e == FTP_EPASSIVE_MODE)
|
if (e == FTP_EPASSIVE_MODE)
|
||||||
sin6->sin6_port = htons(port);
|
sin6->sin6_port = htons(port);
|
||||||
else {
|
else {
|
||||||
bcopy(addr + 2, (char *)&sin6->sin6_addr, 16);
|
memcpy(&sin6->sin6_addr, addr + 2, 16);
|
||||||
bcopy(addr + 19, (char *)&sin6->sin6_port, 2);
|
memcpy(&sin6->sin6_port, addr + 19, 2);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
@ -755,8 +755,8 @@ ftp_transfer(conn_t *conn, const char *oper, const char *file,
|
|||||||
if (e == FTP_EPASSIVE_MODE)
|
if (e == FTP_EPASSIVE_MODE)
|
||||||
sin4->sin_port = htons(port);
|
sin4->sin_port = htons(port);
|
||||||
else {
|
else {
|
||||||
bcopy(addr, (char *)&sin4->sin_addr, 4);
|
memcpy(&sin4->sin_addr, addr, 4);
|
||||||
bcopy(addr + 4, (char *)&sin4->sin_port, 2);
|
memcpy(&sin4->sin_port, addr + 4, 2);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -265,7 +265,7 @@ http_readfn(void *v, char *buf, int len)
|
|||||||
l = io->buflen - io->bufpos;
|
l = io->buflen - io->bufpos;
|
||||||
if (len < l)
|
if (len < l)
|
||||||
l = len;
|
l = len;
|
||||||
bcopy(io->buf + io->bufpos, buf + pos, l);
|
memcpy(buf + pos, io->buf + io->bufpos, l);
|
||||||
io->bufpos += l;
|
io->bufpos += l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user