diff options
author | Rich Salz <rsalz@akamai.com> | 2019-07-31 15:24:20 -0400 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-08-02 11:41:54 +0200 |
commit | ff988500c2f39ae61b2836167b6e0e7b2021220c (patch) | |
tree | ead6acf74e2cf8c8be430e02f78dddcf8281b0cc /crypto/bio/b_sock.c | |
parent | 823ee00a396f91df4517af13dafae679ae10b3f4 (diff) |
Replace FUNCerr with ERR_raise_data
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9496)
Diffstat (limited to 'crypto/bio/b_sock.c')
-rw-r--r-- | crypto/bio/b_sock.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c index 46a2ff7dbc..1747cce658 100644 --- a/crypto/bio/b_sock.c +++ b/crypto/bio/b_sock.c @@ -129,7 +129,8 @@ int BIO_sock_init(void) * probed at run-time with DSO_global_lookup. */ if (WSAStartup(0x0202, &wsa_state) != 0) { - FUNCerr("wsastartup", get_last_socket_error()); + ERR_raise_data(ERR_LIB_SYS, get_last_socket_error(), + "calling wsastartup()"); BIOerr(BIO_F_BIO_SOCK_INIT, BIO_R_WSASTARTUP); return -1; } @@ -189,7 +190,8 @@ int BIO_socket_ioctl(int fd, long type, void *arg) i = ioctlsocket(fd, type, ARG); # endif /* __DJGPP__ */ if (i < 0) - FUNCerr("ioctlsocket", get_last_socket_error()); + ERR_raise_data(ERR_LIB_SYS, get_last_socket_error(), + "calling ioctlsocket()"); return i; } @@ -240,7 +242,8 @@ int BIO_accept(int sock, char **ip_port) ret = -2; goto end; } - FUNCerr("accept", get_last_socket_error()); + ERR_raise_data(ERR_LIB_SYS, get_last_socket_error(), + "calling accept()"); BIOerr(BIO_F_BIO_ACCEPT, BIO_R_ACCEPT_ERROR); goto end; } @@ -305,7 +308,8 @@ int BIO_socket_nbio(int s, int mode) l = fcntl(s, F_GETFL, 0); if (l == -1) { - FUNCerr("fcntl", get_last_sys_error()); + ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(), + "calling fcntl()"); ret = -1; } else { # if defined(O_NONBLOCK) @@ -323,7 +327,8 @@ int BIO_socket_nbio(int s, int mode) ret = fcntl(s, F_SETFL, l); if (ret < 0) { - FUNCerr("fcntl", get_last_sys_error()); + ERR_raise_data(ERR_LIB_SYS, get_last_sys_error(), + "calling fcntl()"); } } # else @@ -346,7 +351,8 @@ int BIO_sock_info(int sock, ret = getsockname(sock, BIO_ADDR_sockaddr_noconst(info->addr), &addr_len); if (ret == -1) { - FUNCerr("getsockname", get_last_socket_error()); + ERR_raise_data(ERR_LIB_SYS, get_last_socket_error(), + "calling getsockname()"); BIOerr(BIO_F_BIO_SOCK_INFO, BIO_R_GETSOCKNAME_ERROR); return 0; } |