From 613056afc32f457a6045514633f9ce75f222e737 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 8 Jun 2026 04:09:44 +0200 Subject: [PATCH] move variable to the left-side of equality expression --- lib/cf-socket.c | 10 +++++----- lib/socketpair.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/cf-socket.c b/lib/cf-socket.c index e90eddcc5a..edeeee0414 100644 --- a/lib/cf-socket.c +++ b/lib/cf-socket.c @@ -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 */ diff --git a/lib/socketpair.c b/lib/socketpair.c index fc5ae15e4b..8db80d1833 100644 --- a/lib/socketpair.c +++ b/lib/socketpair.c @@ -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;