summaryrefslogtreecommitdiffstats
path: root/crypto/bio/b_sock.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2009-04-26 18:06:14 +0000
committerAndy Polyakov <appro@openssl.org>2009-04-26 18:06:14 +0000
commitf81e86d79113c21f1eb0397d311fd3c9170f0881 (patch)
tree8c248c7fbbc4db200b0f14ec48d1a8a40e7ad99a /crypto/bio/b_sock.c
parent2ff2710ccfa3fdb430ec827fbe13a45162520c19 (diff)
Improve readability of bio/b_sock.c
Diffstat (limited to 'crypto/bio/b_sock.c')
-rw-r--r--crypto/bio/b_sock.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c
index da0f126f12..e5c99c6954 100644
--- a/crypto/bio/b_sock.c
+++ b/crypto/bio/b_sock.c
@@ -732,9 +732,9 @@ again:
#endif
if (client.sa_family == AF_INET)
{
- struct sockaddr_in *sin6 =
+ struct sockaddr_in *sin4 =
(struct sockaddr_in *)&client;
- sin6->sin_addr.s_addr=htonl(0x7F000001);
+ sin4->sin_addr.s_addr=htonl(0x7F000001);
}
else goto err;
}
@@ -808,18 +808,18 @@ int BIO_accept(int sock, char **addr)
if (addr == NULL) goto end;
#ifdef EAI_FAMILY
-# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_BEOS_BONE) || defined(OPENSSL_SYS_MSDOS)
-# define SOCKLEN_T size_t
-# elif !defined(SOCKLEN_T)
-# define SOCKLEN_T socklen_t
-#endif
do {
char h[NI_MAXHOST],s[NI_MAXSERV];
size_t nl;
static union { void *p;
- int (*f)(const struct sockaddr *,SOCKLEN_T,
+ int (*f)(const struct sockaddr *,size_t/*socklen_t*/,
char *,size_t,char *,size_t,int);
} p_getnameinfo = {NULL};
+ /* 2nd argument to getnameinfo is specified to
+ * be socklen_t. Unfortunately there is a number
+ * of environments where socklen_t is not defined.
+ * As it's passed by value, it's safe to pass it
+ * as size_t... <appro> */
if (p_getnameinfo.p==NULL)
{