Fix release build compile warnings.

This commit is contained in:
Jan Vidar Krey 2010-01-23 14:59:51 +01:00
parent 92c448b855
commit bfc7c184a7

View File

@ -376,7 +376,7 @@ int net_accept(int fd, struct ip_addr_encap* ipaddr)
if (ipaddr)
{
memset(ipaddr, 0, sizeof(struct ip_addr_encap));
ipaddr->af = addr4->sin_family;
ipaddr->af = addr.ss_family;;
if (ipaddr->af == AF_INET6)
{
char address[INET6_ADDRSTRLEN+1] = { 0, };
@ -599,7 +599,7 @@ const char* net_get_peer_address(int fd)
if (getpeername(fd, (struct sockaddr*) name, &namelen) != -1)
{
int af = name4->sin_family;
int af = storage.ss_family;
if (af == AF_INET6)
{
net_address_to_string(af, (void*) &name6->sin6_addr, address, INET6_ADDRSTRLEN);
@ -637,7 +637,7 @@ const char* net_get_local_address(int fd)
if (getsockname(fd, (struct sockaddr*) name, &namelen) != -1)
{
int af = name4->sin_family;
int af = storage.ss_family;
if (af == AF_INET6)
{
net_address_to_string(af, (void*) &name6->sin6_addr, address, INET6_ADDRSTRLEN);