diff options
author | Paul Yang <paulyang.inf@gmail.com> | 2017-06-26 01:09:46 +0800 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2017-06-26 15:19:12 +0200 |
commit | 9e1d5e8dff693cb2b658f66db4f10709d8364690 (patch) | |
tree | e8c348de8015a6626d5f6275cf656926367f7049 /test | |
parent | e8e5597606d10fcb5620399dd751be4ecf3dcd1d (diff) |
Fix return value checking for BIO_sock_init
BIO_sock_init returns '-1' on error, not '0', so it's needed to check
explicitly istead of using '!'.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/3766)
Diffstat (limited to 'test')
-rw-r--r-- | test/handshake_helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/handshake_helper.c b/test/handshake_helper.c index 509a8f6ede..1192227a42 100644 --- a/test/handshake_helper.c +++ b/test/handshake_helper.c @@ -1135,7 +1135,7 @@ static int create_sctp_socks(int *ssock, int *csock) int ret = 0; int family = 0; - if (!BIO_sock_init()) + if (BIO_sock_init() != 1) return 0; /* |