summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-03-24 14:58:09 +0100
committerJelmer Vernooij <jelmer@samba.org>2012-03-24 14:58:09 +0100
commit2d5275fae0fd4ea73fba78242185a88845bd0666 (patch)
tree05a021b55e5f0b8ef29f6118d41f9bdeb8ee1473 /lib
parent2c9444685d6fd535244638cc51871fd25d1eb1d6 (diff)
downloadsamba-2d5275fae0fd4ea73fba78242185a88845bd0666.tar.gz
samba-2d5275fae0fd4ea73fba78242185a88845bd0666.tar.bz2
samba-2d5275fae0fd4ea73fba78242185a88845bd0666.zip
lib/util: Remove trivial wrapper sys_connect() around connect().
Diffstat (limited to 'lib')
-rw-r--r--lib/util/samba_util.h1
-rw-r--r--lib/util/system.c19
2 files changed, 0 insertions, 20 deletions
diff --git a/lib/util/samba_util.h b/lib/util/samba_util.h
index 13fe831995..a3aa220c40 100644
--- a/lib/util/samba_util.h
+++ b/lib/util/samba_util.h
@@ -138,7 +138,6 @@ _PUBLIC_ int sys_getnameinfo(const struct sockaddr *psa,
char *service,
size_t servlen,
int flags);
-_PUBLIC_ int sys_connect(int fd, const struct sockaddr * addr);
/* The following definitions come from lib/util/genrand.c */
/**
diff --git a/lib/util/system.c b/lib/util/system.c
index ab0f1dc6c4..a7141bf9b0 100644
--- a/lib/util/system.c
+++ b/lib/util/system.c
@@ -123,22 +123,3 @@ _PUBLIC_ int sys_getnameinfo(const struct sockaddr *psa,
}
return getnameinfo(psa, salen, host, hostlen, service, servlen, flags);
}
-
-_PUBLIC_ int sys_connect(int fd, const struct sockaddr * addr)
-{
- socklen_t salen = (socklen_t)-1;
-
- if (addr->sa_family == AF_INET) {
- salen = sizeof(struct sockaddr_in);
- } else if (addr->sa_family == AF_UNIX) {
- salen = sizeof(struct sockaddr_un);
- }
-#if defined(HAVE_IPV6)
- else if (addr->sa_family == AF_INET6) {
- salen = sizeof(struct sockaddr_in6);
- }
-#endif
-
- return connect(fd, addr, salen);
-}
-