use memcpy instead of bcopy.

This commit is contained in:
christos 2006-05-25 02:10:53 +00:00
parent f5e466e11a
commit 830feeb9f3

View File

@ -1,4 +1,4 @@
/* $NetBSD: scmio.c,v 1.15 2003/08/27 08:15:16 itojun Exp $ */ /* $NetBSD: scmio.c,v 1.16 2006/05/25 02:10:53 christos Exp $ */
/* /*
* Copyright (c) 1992 Carnegie Mellon University * Copyright (c) 1992 Carnegie Mellon University
@ -219,13 +219,13 @@ writedata(int count, char *data)
if (bufptr) { if (bufptr) {
if (bufptr->b_cnt + count <= FILEXFER) { if (bufptr->b_cnt + count <= FILEXFER) {
bcopy(data, bufptr->b_ptr, count); memcpy(bufptr->b_ptr, data, count);
bufptr->b_cnt += count; bufptr->b_cnt += count;
bufptr->b_ptr += count; bufptr->b_ptr += count;
return (SCMOK); return (SCMOK);
} }
bp = (bufptr == buffers) ? &buffers[1] : buffers; bp = (bufptr == buffers) ? &buffers[1] : buffers;
bcopy(data, bp->b_data, count); memcpy(bp->b_data, data, count);
bp->b_cnt = count; bp->b_cnt = count;
bp->b_ptr = bp->b_data + count; bp->b_ptr = bp->b_data + count;
data = bufptr->b_data; data = bufptr->b_data;
@ -434,7 +434,7 @@ readdata(int count, char *data)
return (scmerr(-1, "No space in buffer %d", count)); return (scmerr(-1, "No space in buffer %d", count));
bufptr += count; bufptr += count;
bufcnt -= count; bufcnt -= count;
bcopy(data, bufptr, -count); memcpy(bufptr, data, -count);
return (SCMOK); return (SCMOK);
} }
if (count == 0 && data == NULL) { if (count == 0 && data == NULL) {
@ -442,13 +442,13 @@ readdata(int count, char *data)
return (SCMOK); return (SCMOK);
} }
if (count <= bufcnt) { if (count <= bufcnt) {
bcopy(bufptr, data, count); memcpy(data, bufptr, count);
bufptr += count; bufptr += count;
bufcnt -= count; bufcnt -= count;
return (SCMOK); return (SCMOK);
} }
if (bufcnt > 0) { if (bufcnt > 0) {
bcopy(bufptr, data, bufcnt); memcpy(data, bufptr, bufcnt);
data += bufcnt; data += bufcnt;
count -= bufcnt; count -= bufcnt;
} }
@ -476,7 +476,7 @@ readdata(int count, char *data)
m -= x; m -= x;
bufcnt += x; bufcnt += x;
} }
bcopy(bufptr, data, count); memcpy(data, bufptr, count);
bufptr += count; bufptr += count;
bufcnt -= count; bufcnt -= count;
return (SCMOK); return (SCMOK);