From 82a87d043498eeacb7e4f3edc85d1b7c424ea853 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Tue, 2 Dec 2014 00:20:51 +0100 Subject: Replace `bcopy' with `memcpy' or `memmove' as appropriate * ext2fs/inode.c: Replace `bcopy' with `memcpy' or `memmove' as appropriate. * ext2fs/pager.c: Likewise. * isofs/lookup.c: Likewise. * isofs/main.c: Likewise. * isofs/rr.c: Likewise. * libdiskfs/file-get-trans.c: Likewise. * libiohelp/return-buffer.c: Likewise. * libpager/pagemap.c: Likewise. * libpipe/pq.c: Likewise. * libpipe/pq.h: Likewise. * libstore/unzipstore.c: Likewise. * mach-defpager/default_pager.c: Likewise. * pfinet/ethernet.c: Likewise. * pfinet/tunnel.c: Likewise. * storeio/dev.c: Likewise. --- libpipe/pq.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libpipe/pq.c') diff --git a/libpipe/pq.c b/libpipe/pq.c index 102f3ee3..fe7dd8ae 100644 --- a/libpipe/pq.c +++ b/libpipe/pq.c @@ -249,10 +249,10 @@ packet_realloc (struct packet *packet, size_t new_len) /* If there was an operation like vm_move, we could use that in the case where both the old and the new buffers were vm_alloced (on the assumption that creating COW pages is somewhat more costly). - But there's not, and bcopy will do vm_copy where it can. Will we + But there's not, and memcpy may do vm_copy where it can. Will we still takes faults on the new copy, even though we've deallocated the old one??? XXX */ - bcopy (start, new_buf, end - start); + memcpy (new_buf, start, end - start); /* And get rid of the old buffer. */ if (old_len > 0) @@ -305,7 +305,7 @@ packet_set_ports (struct packet *packet, packet->ports = new_ports; packet->ports_alloced = num_ports; } - bcopy (ports, packet->ports, sizeof (mach_port_t) * num_ports); + memcpy (packet->ports, ports, sizeof (mach_port_t) * num_ports); packet->num_ports = num_ports; return 0; } @@ -324,7 +324,7 @@ packet_read_ports (struct packet *packet, return errno; } *num_ports = packet->num_ports; - bcopy (packet->ports, *ports, length); + memcpy (*ports, packet->ports, length); packet->num_ports = 0; return 0; } @@ -341,7 +341,7 @@ packet_write (struct packet *packet, return err; /* Add the new data. */ - bcopy (data, packet->buf_end, data_len); + memcpy (packet->buf_end, data, data_len); packet->buf_end += data_len; if (amount != NULL) *amount = data_len; @@ -411,7 +411,7 @@ packet_fetch (struct packet *packet, if (*data_len < amount) *data = mmap (0, amount, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0); - bcopy (start, *data, amount); + memcpy (*data, start, amount); start += amount; if (remove && start - buf > 2 * PACKET_SIZE_LARGE) -- cgit v1.2.3