diff --git a/Changes b/Changes index ee2338ca3..c4d2a57d2 100644 --- a/Changes +++ b/Changes @@ -1274,3 +1274,4 @@ seen. gmtime warning still there - Fixed a cloak problem on OSes with 64bit integers (reported by wolven) - Updated credits - Memory leak fixes with scanners +- Some fixes with connect(). Knowing my luck this will fuck up to hell diff --git a/src/modules/scan_http.c b/src/modules/scan_http.c index ce90994e4..3e594c4d7 100644 --- a/src/modules/scan_http.c +++ b/src/modules/scan_http.c @@ -241,8 +241,7 @@ void scan_http_scan_port(HSStruct *z) */ set_non_blocking(fd, NULL); if ((retval = connect(fd, (struct sockaddr *)&sin, - sizeof(sin))) == -1 && !((ERRNO == P_EWOULDBLOCK) - || (ERRNO == P_EINPROGRESS))) + sizeof(sin))) == -1 && !(ERRNO == P_EINPROGRESS)) { /* we have no socks server! */ CLOSE_SOCK(fd); diff --git a/src/modules/scan_socks.c b/src/modules/scan_socks.c index e86db5079..74ff80038 100644 --- a/src/modules/scan_socks.c +++ b/src/modules/scan_socks.c @@ -223,8 +223,7 @@ void scan_socks4_scan(Scan_AddrStruct *h) */ set_non_blocking(fd, NULL); if ((retval = connect(fd, (struct sockaddr *)&sin, - sizeof(sin))) == -1 && !((ERRNO == P_EWOULDBLOCK) - || (ERRNO == P_EINPROGRESS))) + sizeof(sin))) == -1 && !(ERRNO == P_EWOULDBLOCK)) { /* we have no socks server! */ CLOSE_SOCK(fd); @@ -361,8 +360,7 @@ void scan_socks5_scan(Scan_AddrStruct *h) set_non_blocking(fd, NULL); if ((retval = connect(fd, (struct sockaddr *)&sin, sizeof(sin))) == -1 && - !((ERRNO == P_EWOULDBLOCK) - || (ERRNO == P_EINPROGRESS))) + !(ERRNO == P_EINPROGRESS)) { /* we have no socks server! */ CLOSE_SOCK(fd); diff --git a/src/s_auth.c b/src/s_auth.c index 0534cb6c5..81fcbe0f9 100644 --- a/src/s_auth.c +++ b/src/s_auth.c @@ -100,8 +100,7 @@ void start_auth(aClient *cptr) sock.SIN_FAMILY = AFINET; if (connect(cptr->authfd, (struct sockaddr *)&sock, - sizeof(sock)) == -1 && !((ERRNO == P_EWOULDBLOCK) - || (ERRNO == P_EINPROGRESS))) + sizeof(sock)) == -1 && !(ERRNO == P_EINPROGRESS)) { ircstp->is_abad++; /*