Commit 39f36b55 authored by Pekka Pessi's avatar Pekka Pessi

su.c: do not cast to/from address to (void *) with win32 su_sendto()/su_recvfrom()

Patch from Mike Jerris.

darcs-hash:20061122172157-65a35-e0ff769511c71852d0bd7dd26d182ad44b140bc6.gz
parent 3a3d3b4e
......@@ -229,7 +229,7 @@ ssize_t su_sendto(su_socket_t s, void *buffer, size_t length, int flags,
if (length > INT_MAX)
length = INT_MAX;
return (ssize_t)sendto(s, buffer, (int)length, flags,
(void *)to, (int) tolen);
&to->su_sa, (int) tolen);
}
ssize_t su_recv(su_socket_t s, void *buffer, size_t length, int flags)
......@@ -252,7 +252,7 @@ ssize_t su_recvfrom(su_socket_t s, void *buffer, size_t length, int flags,
length = INT_MAX;
retval = recvfrom(s, buffer, (int)length, flags,
(void *)from, fromlen ? &ilen : NULL);
&from->su_sa, fromlen ? &ilen : NULL);
if (fromlen)
*fromlen = ilen;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment