diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-07-08 18:20:12 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-09-06 23:22:15 -0700 |
commit | 72cba07b65e1e096f4709e810ee1c5618e7d0125 (patch) | |
tree | 242dac78de37f79e10369cd1964d1718d539bfde | |
parent | 6c4d2918fe48acc49206b5b8f83738d9c8688475 (diff) |
Convert remaining bcopy() calls to memcpy()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
-rw-r--r-- | common.c | 2 | ||||
-rw-r--r-- | fd.c | 2 | ||||
-rw-r--r-- | server.c | 6 |
3 files changed, 5 insertions, 5 deletions
@@ -277,7 +277,7 @@ SetUpConnectionSocket(int iport, void (*connectionFunc) (int)) if (hp == NULL) panic("No address for our host"); - bcopy((char *) hp->h_addr, (char *) &sin.sin_addr, hp->h_length); + memcpy(&sin.sin_addr, hp->h_addr, hp->h_length); } /* new code -- INADDR_ANY should be better than using the name of the host machine. The host machine may have several different network @@ -328,7 +328,7 @@ MakeConnection(const char *server, short port, int report, debug(1, (stderr, "gethostbyname failed for %s\n", server)); panic("Can't open connection to Server"); } - bcopy((char *) hp->h_addr, (char *) &sin.sin_addr, hp->h_length); + memcpy(&sin.sin_addr, hp->h_addr, hp->h_length); } sin.sin_family = AF_INET; @@ -203,9 +203,9 @@ SaveBytes(FD fd, const unsigned char *buf, long n) } /* now copy the new bytes onto the end of the old bytes */ - bcopy(/* from */ buf, - /* to */ (CS[fd].SavedBytes + CS[fd].NumberofSavedBytes), - /* count */ n); + memcpy(/* to */ (CS[fd].SavedBytes + CS[fd].NumberofSavedBytes), + /* from */ buf, + /* count */ n); CS[fd].NumberofSavedBytes += n; } |