diff options
author | lzmths <luizmatheus.ac@gmail.com> | 2015-12-14 11:04:00 -0300 |
---|---|---|
committer | lzmths <luizmatheus.ac@gmail.com> | 2015-12-14 11:04:00 -0300 |
commit | 4b41eebeb27051c9e6fb32291a560130ff7a0a96 (patch) | |
tree | 00334a097099768bc0b3e240e3f6e0f1fd674388 /evutil.c | |
parent | 809bb39b2b7b632c86337877b483520d997cd5db (diff) | |
download | libevent-4b41eebeb27051c9e6fb32291a560130ff7a0a96.tar.gz |
Refactoring conditional directives that break parts of statements.
Diffstat (limited to 'evutil.c')
-rw-r--r-- | evutil.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -226,16 +226,17 @@ evutil_ersatz_socketpair_(int family, int type, int protocol, struct sockaddr_in connect_addr; ev_socklen_t size; int saved_errno = -1; - - if (protocol - || (family != AF_INET + int family_test; + + family_test = family != AF_INET; #ifdef AF_UNIX - && family != AF_UNIX + family_test = family_test && (family != AF_UNIX); #endif - )) { + if (protocol || family_test) { EVUTIL_SET_SOCKET_ERROR(ERR(EAFNOSUPPORT)); return -1; } + if (!fd) { EVUTIL_SET_SOCKET_ERROR(ERR(EINVAL)); return -1; |