summaryrefslogtreecommitdiffstats
path: root/source/lib/util_sock.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/lib/util_sock.c')
-rw-r--r--source/lib/util_sock.c10
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");