move variable to the left-side of equality expression

This commit is contained in:
Viktor Szakats 2026-06-08 04:09:44 +02:00
parent 8a192a5b70
commit 613056afc3
No known key found for this signature in database
2 changed files with 7 additions and 7 deletions

View file

@ -1562,14 +1562,14 @@ static CURLcode cf_socket_send(struct Curl_cfilter *cf, struct Curl_easy *data,
if(
#ifdef USE_WINSOCK
/* This is how Windows does it */
(SOCKEWOULDBLOCK == sockerr)
(sockerr == SOCKEWOULDBLOCK)
#else
/* errno may be EWOULDBLOCK or on some systems EAGAIN when it returned
due to its inability to send off data without blocking. We therefore
treat both error codes the same here */
SOCK_EWOULDBLOCK_EAGAIN(sockerr) ||
(SOCKEINTR == sockerr) ||
(SOCKEINPROGRESS == sockerr)
(sockerr == SOCKEINTR) ||
(sockerr == SOCKEINPROGRESS)
#endif
) {
/* EWOULDBLOCK */
@ -1628,13 +1628,13 @@ static CURLcode cf_socket_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
if(
#ifdef USE_WINSOCK
/* This is how Windows does it */
(SOCKEWOULDBLOCK == sockerr)
(sockerr == SOCKEWOULDBLOCK)
#else
/* errno may be EWOULDBLOCK or on some systems EAGAIN when it returned
due to its inability to send off data without blocking. We therefore
treat both error codes the same here */
SOCK_EWOULDBLOCK_EAGAIN(sockerr) ||
(SOCKEINTR == sockerr)
(sockerr == SOCKEINTR)
#endif
) {
/* EWOULDBLOCK */

View file

@ -235,13 +235,13 @@ static int wakeup_inet(curl_socket_t socks[2], bool nonblocking)
if(
#ifdef USE_WINSOCK
/* This is how Windows does it */
(SOCKEWOULDBLOCK == sockerr)
(sockerr == SOCKEWOULDBLOCK)
#else
/* errno may be EWOULDBLOCK or on some systems EAGAIN when it
returned due to its inability to send off data without
blocking. We therefore treat both error codes the same here */
SOCK_EWOULDBLOCK_EAGAIN(sockerr) ||
(SOCKEINTR == sockerr) || (SOCKEINPROGRESS == sockerr)
(sockerr == SOCKEINTR) || (sockerr == SOCKEINPROGRESS)
#endif
) {
continue;