diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2014-04-16 13:01:10 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2014-04-16 13:01:10 +0000 |
commit | 6648a883f9dd346292446f7d2cdf930d13d94d58 (patch) | |
tree | ae8e3d0442ea04cf132d7c14306db4e18618eb1c /lib/libcrypto/bio | |
parent | 1566a2a4837077aa5afd18c4ddcfd640c77935e9 (diff) |
Clean up non-fatal error handling - we know which error numbers we have
defined.
ok miod@ beck@
Diffstat (limited to 'lib/libcrypto/bio')
-rw-r--r-- | lib/libcrypto/bio/bss_dgram.c | 30 | ||||
-rw-r--r-- | lib/libcrypto/bio/bss_fd.c | 32 | ||||
-rw-r--r-- | lib/libcrypto/bio/bss_sock.c | 43 |
3 files changed, 0 insertions, 105 deletions
diff --git a/lib/libcrypto/bio/bss_dgram.c b/lib/libcrypto/bio/bss_dgram.c index 328bab9ce3c..9219fffc8d0 100644 --- a/lib/libcrypto/bio/bss_dgram.c +++ b/lib/libcrypto/bio/bss_dgram.c @@ -1687,41 +1687,11 @@ int BIO_dgram_non_fatal_error(int err) { switch (err) { - -#ifdef EWOULDBLOCK -# ifdef WSAEWOULDBLOCK -# if WSAEWOULDBLOCK != EWOULDBLOCK - case EWOULDBLOCK: -# endif -# else - case EWOULDBLOCK: -# endif -#endif - -#ifdef EINTR case EINTR: -#endif - -#ifdef EAGAIN -#if EWOULDBLOCK != EAGAIN case EAGAIN: -# endif -#endif - -#ifdef EPROTO - case EPROTO: -#endif - -#ifdef EINPROGRESS case EINPROGRESS: -#endif - -#ifdef EALREADY case EALREADY: -#endif - return (1); - /* break; */ default: break; } diff --git a/lib/libcrypto/bio/bss_fd.c b/lib/libcrypto/bio/bss_fd.c index 86757154e8a..c0e7f08fbb5 100644 --- a/lib/libcrypto/bio/bss_fd.c +++ b/lib/libcrypto/bio/bss_fd.c @@ -270,44 +270,12 @@ int BIO_fd_non_fatal_error(int err) { switch (err) { - -#ifdef EWOULDBLOCK -# ifdef WSAEWOULDBLOCK -# if WSAEWOULDBLOCK != EWOULDBLOCK - case EWOULDBLOCK: -# endif -# else - case EWOULDBLOCK: -# endif -#endif - -#if defined(ENOTCONN) case ENOTCONN: -#endif - -#ifdef EINTR case EINTR: -#endif - -#ifdef EAGAIN -#if EWOULDBLOCK != EAGAIN case EAGAIN: -# endif -#endif - -#ifdef EPROTO - case EPROTO: -#endif - -#ifdef EINPROGRESS case EINPROGRESS: -#endif - -#ifdef EALREADY case EALREADY: -#endif return (1); - /* break; */ default: break; } diff --git a/lib/libcrypto/bio/bss_sock.c b/lib/libcrypto/bio/bss_sock.c index 30640d8f962..c05b8d37f1d 100644 --- a/lib/libcrypto/bio/bss_sock.c +++ b/lib/libcrypto/bio/bss_sock.c @@ -233,55 +233,12 @@ int BIO_sock_non_fatal_error(int err) { switch (err) { -#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_NETWARE) -# if defined(WSAEWOULDBLOCK) - case WSAEWOULDBLOCK: -# endif - -# if 0 /* This appears to always be an error */ -# if defined(WSAENOTCONN) - case WSAENOTCONN: -# endif -# endif -#endif - -#ifdef EWOULDBLOCK -# ifdef WSAEWOULDBLOCK -# if WSAEWOULDBLOCK != EWOULDBLOCK - case EWOULDBLOCK: -# endif -# else - case EWOULDBLOCK: -# endif -#endif - -#if defined(ENOTCONN) case ENOTCONN: -#endif - -#ifdef EINTR case EINTR: -#endif - -#ifdef EAGAIN -# if EWOULDBLOCK != EAGAIN case EAGAIN: -# endif -#endif - -#ifdef EPROTO - case EPROTO: -#endif - -#ifdef EINPROGRESS case EINPROGRESS: -#endif - -#ifdef EALREADY case EALREADY: -#endif return (1); - /* break; */ default: break; } |