From 0ef41beb951a3601243e1af0f0c1555cc56006ee Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Wed, 11 May 2005 20:03:41 +0000 Subject: [PATCH] * samba/lib/util_sock.c: Fix gcc 4.0 warnings. --- vfs/ChangeLog | 2 ++ vfs/samba/lib/util_sock.c | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/vfs/ChangeLog b/vfs/ChangeLog index 6e6a191ee..bb4bf0708 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,5 +1,7 @@ 2005-05-11 Pavel Roskin + * samba/lib/util_sock.c: Fix gcc 4.0 warnings. + * samba/lib/debug.c (dbghdr): Constify arguments file and func. 2005-05-10 Pavel Roskin diff --git a/vfs/samba/lib/util_sock.c b/vfs/samba/lib/util_sock.c index b4d3218fc..60c298af2 100644 --- a/vfs/samba/lib/util_sock.c +++ b/vfs/samba/lib/util_sock.c @@ -50,7 +50,8 @@ determine if a file descriptor is in fact a socket ****************************************************************************/ BOOL is_a_socket(int fd) { - int v,l; + int v; + unsigned int l; l = sizeof(int); return(getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0); } @@ -200,7 +201,7 @@ ssize_t read_udp_socket(int fd,char *buf,size_t len) { ssize_t ret; struct sockaddr_in sock; - int socklen; + unsigned int socklen; socklen = sizeof(sock); memset((char *)&sock,'\0',socklen); @@ -807,7 +808,7 @@ char *client_name(int fd) { struct sockaddr sa; struct sockaddr_in *sockin = (struct sockaddr_in *) (&sa); - int length = sizeof(sa); + unsigned int length = sizeof(sa); static pstring name_buf; struct hostent *hp; static int last_fd=-1; @@ -853,7 +854,7 @@ char *client_addr(int fd) { struct sockaddr sa; struct sockaddr_in *sockin = (struct sockaddr_in *) (&sa); - int length = sizeof(sa); + unsigned int length = sizeof(sa); static fstring addr_buf; static int last_fd = -1;