summaryrefslogtreecommitdiff
path: root/source4/lib/util_sock.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-08-15 18:54:44 +0000
committerAndrew Tridgell <tridge@samba.org>2003-08-15 18:54:44 +0000
commitde10237719db8101cd9487b257761d4721f857ab (patch)
tree7f315aa67f37c64626f881a94abc3d0d1da6e7e5 /source4/lib/util_sock.c
parent8e4ab747b02207671203d40cd2a78692da78faef (diff)
downloadsamba-de10237719db8101cd9487b257761d4721f857ab.tar.gz
samba-de10237719db8101cd9487b257761d4721f857ab.tar.bz2
samba-de10237719db8101cd9487b257761d4721f857ab.zip
more fixes from the IRIX compiler (thanks herb!)
(This used to be commit 02d068ba7d81d6db25122144981c63f74ad44025)
Diffstat (limited to 'source4/lib/util_sock.c')
-rw-r--r--source4/lib/util_sock.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source4/lib/util_sock.c b/source4/lib/util_sock.c
index 42dc04f6c8..8362290804 100644
--- a/source4/lib/util_sock.c
+++ b/source4/lib/util_sock.c
@@ -439,7 +439,6 @@ static BOOL matchname(char *remotehost, struct in_addr addr)
char *get_socket_name(TALLOC_CTX *mem_ctx, int fd, BOOL force_lookup)
{
char *name_buf;
- char *addr_buf;
struct hostent *hp;
struct in_addr addr;
char *p;
@@ -457,8 +456,6 @@ char *get_socket_name(TALLOC_CTX *mem_ctx, int fd, BOOL force_lookup)
name_buf = talloc_strdup(mem_ctx, "UNKNOWN");
if (fd == -1) return name_buf;
- addr_buf = talloc_strdup(mem_ctx, p);
-
addr = *interpret_addr2(mem_ctx, p);
/* Look up the remote host name. */
@@ -473,7 +470,7 @@ char *get_socket_name(TALLOC_CTX *mem_ctx, int fd, BOOL force_lookup)
}
}
- alpha_strcpy(name_buf, name_buf, "_-.", sizeof(name_buf));
+ alpha_strcpy(name_buf, name_buf, "_-.", strlen(name_buf)+1);
if (strstr(name_buf,"..")) {
name_buf = talloc_strdup(mem_ctx, "UNKNOWN");
}