[PATCH:xscope 09/24] Convert remaining bcopy() calls to memcpy()
Alan Coopersmith
alan.coopersmith at oracle.com
Fri Aug 31 22:17:51 PDT 2012
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
common.c | 2 +-
fd.c | 2 +-
server.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/common.c b/common.c
index 8c88aae..3997464 100644
--- a/common.c
+++ b/common.c
@@ -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
diff --git a/fd.c b/fd.c
index 45a7d77..7b6accd 100644
--- a/fd.c
+++ b/fd.c
@@ -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;
diff --git a/server.c b/server.c
index efeae56..3369460 100644
--- a/server.c
+++ b/server.c
@@ -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;
}
--
1.7.9.2
More information about the xorg-devel
mailing list