summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2007-12-09 14:02:23 -0800
committerJames Peach <jpeach@samba.org>2007-12-09 14:02:23 -0800
commit8892c7a23599bec297a0486dc1820e047e054659 (patch)
treede7890bb113bc370dc13f23730b896f6b534057d
parent39f0e6d22cc9ffed65cfe16b7fa9d69940261532 (diff)
downloadsamba-8892c7a23599bec297a0486dc1820e047e054659.tar.gz
samba-8892c7a23599bec297a0486dc1820e047e054659.tar.bz2
samba-8892c7a23599bec297a0486dc1820e047e054659.zip
Choose a better default for sockaddr length.
(This used to be commit 5c347cb46d85d04bbba7c99dca7ff9628f977d84)
-rw-r--r--source3/lib/system.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index eb6dcae6fb..619627a770 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -2475,7 +2475,7 @@ int sys_getnameinfo(const struct sockaddr *psa,
int sys_connect(int fd, const struct sockaddr * addr)
{
- socklen_t salen = -1;
+ socklen_t salen = addr->sa_len;
if (addr->sa_family == AF_INET) {
salen = sizeof(struct sockaddr_in);