diff options
author | Gerald Carter <jerry@samba.org> | 2002-06-17 18:36:36 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-06-17 18:36:36 +0000 |
commit | 1e6e5b299c235b513095a76a4cd9fffc41e8fc9c (patch) | |
tree | 9f741529073ad411cc7328334e26d3e35b1d33f1 /source/lib/util_sock.c | |
parent | a11c5d7ad07d259d764aede4745d13f8163a8212 (diff) | |
download | samba-1e6e5b299c235b513095a76a4cd9fffc41e8fc9c.tar.gz samba-1e6e5b299c235b513095a76a4cd9fffc41e8fc9c.tar.xz samba-1e6e5b299c235b513095a76a4cd9fffc41e8fc9c.zip |
beginning to sync up for 2.2.5 release....
Diffstat (limited to 'source/lib/util_sock.c')
-rw-r--r-- | source/lib/util_sock.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c index 4b5abbb5724..dca80289e1f 100644 --- a/source/lib/util_sock.c +++ b/source/lib/util_sock.c @@ -42,7 +42,8 @@ int smb_read_error = 0; BOOL is_a_socket(int fd) { - int v,l; + int v; + socklen_t l; l = sizeof(int); return(getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0); } @@ -99,7 +100,8 @@ smb_socket_option socket_options[] = { static void print_socket_options(int s) { - int value, vlen = 4; + int value; + socklen_t vlen = 4; smb_socket_option *p = &socket_options[0]; for (; p->name != NULL; p++) { @@ -931,7 +933,7 @@ static BOOL matchname(char *remotehost,struct in_addr addr) /* Look up the host address in the address list we just got. */ for (i = 0; hp->h_addr_list[i]; i++) { - if (memcmp(hp->h_addr_list[i], (caddr_t) & addr, sizeof(addr)) == 0) + if (memcmp(hp->h_addr_list[i], (void *) & addr, sizeof(addr)) == 0) return True; } @@ -997,7 +999,7 @@ char *get_socket_addr(int fd) { struct sockaddr sa; struct sockaddr_in *sockin = (struct sockaddr_in *) (&sa); - int length = sizeof(sa); + socklen_t length = sizeof(sa); static fstring addr_buf; fstrcpy(addr_buf,"0.0.0.0"); |