server: Use socklen_t where appropriate.

This commit is contained in:
Alexandre Julliard 2013-03-06 13:40:38 +01:00
parent 3f807e7a1a
commit 9fdf7bc771
2 changed files with 4 additions and 4 deletions

View File

@ -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 );

View File

@ -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)
{