Commit 9fdf7bc7 authored by Alexandre Julliard's avatar Alexandre Julliard

server: Use socklen_t where appropriate.

parent 3f807e7a
......@@ -537,7 +537,7 @@ static void master_socket_poll_event( struct fd *fd, int event )
else if (event & POLLIN)
{
struct sockaddr_un dummy;
unsigned int len = sizeof(dummy);
socklen_t len = sizeof(dummy);
int client = accept( get_unix_fd( master_socket->fd ), (struct sockaddr *) &dummy, &len );
if (client == -1) return;
fcntl( client, F_SETFL, O_NONBLOCK );
......
......@@ -285,9 +285,9 @@ static void sock_wake_up( struct sock *sock )
static inline int sock_error( struct fd *fd )
{
unsigned int optval = 0, optlen;
unsigned int optval = 0;
socklen_t optlen = sizeof(optval);
optlen = sizeof(optval);
getsockopt( get_unix_fd(fd), SOL_SOCKET, SO_ERROR, (void *) &optval, &optlen);
return optval;
}
......@@ -667,7 +667,7 @@ static int accept_new_fd( struct sock *sock )
*/
int acceptfd;
struct sockaddr saddr;
unsigned int slen = sizeof(saddr);
socklen_t slen = sizeof(saddr);
acceptfd = accept( get_unix_fd(sock->fd), &saddr, &slen);
if (acceptfd == -1)
{
......
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