summaryrefslogtreecommitdiffstats
path: root/stream/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/udp.c')
-rw-r--r--stream/udp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/stream/udp.c b/stream/udp.c
index 53a581e332..c09a7f7e07 100644
--- a/stream/udp.c
+++ b/stream/udp.c
@@ -76,7 +76,7 @@ udp_open_socket (URL_t *url)
if (isalpha (url->hostname[0]))
{
#if !HAVE_WINSOCK2_H
- hp = (struct hostent *) gethostbyname (url->hostname);
+ hp = gethostbyname (url->hostname);
if (!hp)
{
mp_msg (MSGT_NETWORK, MSGL_ERR,
@@ -84,8 +84,8 @@ udp_open_socket (URL_t *url)
closesocket (socket_server_fd);
return -1;
}
- memcpy ((void *) &server_address.sin_addr.s_addr,
- (void *) hp->h_addr_list[0], hp->h_length);
+ memcpy (&server_address.sin_addr.s_addr,
+ hp->h_addr_list[0], hp->h_length);
#else
server_address.sin_addr.s_addr = htonl (INADDR_ANY);
#endif /* HAVE_WINSOCK2_H */
@@ -124,7 +124,7 @@ udp_open_socket (URL_t *url)
#if HAVE_WINSOCK2_H
if (isalpha (url->hostname[0]))
{
- hp = (struct hostent *) gethostbyname (url->hostname);
+ hp = gethostbyname (url->hostname);
if (!hp)
{
mp_msg (MSGT_NETWORK, MSGL_ERR,
@@ -132,13 +132,13 @@ udp_open_socket (URL_t *url)
closesocket (socket_server_fd);
return -1;
}
- memcpy ((void *) &server_address.sin_addr.s_addr,
- (void *) hp->h_addr, hp->h_length);
+ memcpy (&server_address.sin_addr.s_addr,
+ hp->h_addr, hp->h_length);
}
else
{
unsigned int addr = inet_addr (url->hostname);
- memcpy ((void *) &server_address.sin_addr, (void *) &addr, sizeof (addr));
+ memcpy (&server_address.sin_addr, &addr, sizeof (addr));
}
#endif /* HAVE_WINSOCK2_H */