ws2_32: Use assignment instead of memcpy to copy structs.

This commit is contained in:
Michael Stefaniuc 2013-01-24 14:21:53 +01:00 committed by Alexandre Julliard
parent c751389df4
commit f21d45417f
2 changed files with 2 additions and 2 deletions

View File

@ -2183,7 +2183,7 @@ static BOOL interface_bind( SOCKET s, int fd, struct sockaddr *addr )
if (setsockopt(fd, IPPROTO_IP, IP_UNICAST_IF, &ifindex, sizeof(ifindex)) != 0)
goto cleanup; /* Failed to suggest egress interface */
memcpy(&specific_interface_filter, &generic_interface_filter, sizeof(generic_interface_filter));
specific_interface_filter = generic_interface_filter;
specific_interface_filter.iface_rule.k = adapter->Index;
filter_prog.len = sizeof(generic_interface_filter)/sizeof(struct sock_filter);
filter_prog.filter = (struct sock_filter *) &specific_interface_filter;

View File

@ -2725,7 +2725,7 @@ static void test_getsockname(void)
return;
}
memcpy(&sa_get, &sa_set, sizeof(sa_set));
sa_get = sa_set;
if (getsockname(sock, (struct sockaddr*) &sa_get, &sa_get_len) == 0)
ok(0, "getsockname on unbound socket should fail\n");
else {