Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #470 from cdolan/master

Fixed test compilation issue by using memset/memmove rather than bzero/bcopy
  • Loading branch information...
commit 37f8ce69c17c7200605d3c3e688bf1a9e191e121 2 parents 30eaadd + 6559da3
@hurtonm hurtonm authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 tests/test_raw_sock.cpp
View
6 tests/test_raw_sock.cpp
@@ -49,9 +49,9 @@ int tcp_client ()
server = gethostbyname ("localhost");
assert (server);
- bzero (&serv_addr, sizeof serv_addr);
+ memset (&serv_addr, 0, sizeof serv_addr);
serv_addr.sin_family = AF_INET;
- bcopy (server->h_addr, &serv_addr.sin_addr.s_addr, server->h_length);
+ memmove (&serv_addr.sin_addr.s_addr, server->h_addr, server->h_length);
serv_addr.sin_port = htons (portno);
int rc = connect (sockfd, (struct sockaddr *) &serv_addr, sizeof serv_addr);
@@ -74,7 +74,7 @@ int tcp_server ()
assert (rc == 0);
struct sockaddr_in serv_addr;
- bzero (&serv_addr, sizeof serv_addr);
+ memset (&serv_addr, 0, sizeof serv_addr);
serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = htonl (INADDR_ANY);
serv_addr.sin_port = htons (5555);
Please sign in to comment.
Something went wrong with that request. Please try again.