Browse Source

Change the only bcopy user to memmove and remove internal version of bcopy

Peter S. Mazinger 18 years ago
parent
commit
9de494dadb
2 changed files with 4 additions and 6 deletions
  1. 4 4
      libc/inet/rpc/rcmd.c
  2. 0 2
      libc/string/bcopy.c

+ 4 - 4
libc/inet/rpc/rcmd.c

@@ -93,7 +93,7 @@ libc_hidden_proto(strcpy)
 libc_hidden_proto(strlen)
 libc_hidden_proto(strncmp)
 libc_hidden_proto(strnlen)
-libc_hidden_proto(bcopy)
+libc_hidden_proto(memmove)
 libc_hidden_proto(getpid)
 libc_hidden_proto(socket)
 libc_hidden_proto(close)
@@ -230,7 +230,7 @@ int rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
 		}
 		fcntl(s, F_SETOWN, pid);
 		sin.sin_family = hp->h_addrtype;
-		bcopy(hp->h_addr_list[0], &sin.sin_addr,
+		memmove(&sin.sin_addr, hp->h_addr_list[0],
 		      MIN (sizeof (sin.sin_addr), hp->h_length));
 		sin.sin_port = rport;
 		if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) >= 0) /* __connect */
@@ -253,7 +253,7 @@ int rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
 			__set_errno (oerrno);
 			perror(0);
 			hp->h_addr_list++;
-			bcopy(hp->h_addr_list[0], &sin.sin_addr,
+			memmove(&sin.sin_addr, hp->h_addr_list[0],
 			      MIN (sizeof (sin.sin_addr), hp->h_length));
 			(void)fprintf(stderr, "Trying %s...\n",
 			    inet_ntoa(sin.sin_addr));
@@ -423,7 +423,7 @@ int ruserok(rhost, superuser, ruser, luser)
 	}
 #endif
 	for (ap = hp->h_addr_list; *ap; ++ap) {
-		bcopy(*ap, &addr, sizeof(addr));
+		memmove(&addr, *ap, sizeof(addr));
 		if (iruserok2(addr, superuser, ruser, luser, rhost) == 0)
 			return 0;
 	}

+ 0 - 2
libc/string/bcopy.c

@@ -7,7 +7,6 @@
 
 #include "_string.h"
 
-libc_hidden_proto(bcopy)
 libc_hidden_proto(memmove)
 
 void bcopy(const void *s2, void *s1, size_t n)
@@ -52,4 +51,3 @@ void bcopy(const void *s2, void *s1, size_t n)
 #endif
 #endif
 }
-libc_hidden_def(bcopy)