diff options
author | Bodo Möller <bodo@openssl.org> | 2000-10-09 16:40:16 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2000-10-09 16:40:16 +0000 |
commit | 8c23788dd1f4e655d790f3e67a2e6f42feecb4cf (patch) | |
tree | 3543cafa91522b756c7dbfa261893dbe75ba6d1a | |
parent | ef76e3dbda0b604e7dd360db8b7806d1c3f8e3f4 (diff) | |
download | openssl-new-8c23788dd1f4e655d790f3e67a2e6f42feecb4cf.tar.gz |
BIO_sock_init() returns 1 for success and -1 for failure, not 0;
thus the condition '!BIO_sock_init()' doesn't make sense.
-rw-r--r-- | crypto/bio/b_sock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c index 64310058b4..e971a07de0 100644 --- a/crypto/bio/b_sock.c +++ b/crypto/bio/b_sock.c @@ -113,8 +113,8 @@ int BIO_get_host_ip(const char *str, unsigned char *ip) /* At this point, we have something that is most probably correct in some way, so let's init the socket. */ - if (!BIO_sock_init()) - return(0); /* don't generate another error code here */ + if (BIO_sock_init() != 1) + return 0; /* don't generate another error code here */ /* If the string actually contained an IP address, we need not do anything more */ @@ -527,7 +527,7 @@ int BIO_get_accept_socket(char *host, int bind_mode) unsigned long l; int err_num; - if (!BIO_sock_init()) return(INVALID_SOCKET); + if (BIO_sock_init() != 1) return(INVALID_SOCKET); if ((str=BUF_strdup(host)) == NULL) return(INVALID_SOCKET); |