shorten name

This commit is contained in:
Viktor Szakats 2026-06-12 19:55:16 +02:00
parent 62b92b22df
commit 4da0f86d20
No known key found for this signature in database
7 changed files with 24 additions and 25 deletions

View file

@ -939,7 +939,7 @@ static bool verifyconnect(curl_socket_t sockfd, int *error)
static CURLcode socket_connect_result(struct Curl_easy *data,
const char *ipaddress, int error)
{
if(SOCK_EWOULDBLOCK_EAGAIN(error) || error == SOCKEINPROGRESS)
if(SOCK_EAGAIN(error) || error == SOCKEINPROGRESS)
return CURLE_OK;
/* unknown error, fallthrough and try another address! */
@ -1550,7 +1550,7 @@ static CURLcode cf_socket_send(struct Curl_cfilter *cf, struct Curl_easy *data,
/* The socket error 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 */
if(SOCK_EWOULDBLOCK_EAGAIN(sockerr)
if(SOCK_EAGAIN(sockerr)
#ifndef USE_WINSOCK
|| (sockerr == SOCKEINTR) || (sockerr == SOCKEINPROGRESS)
#endif
@ -1609,7 +1609,7 @@ static CURLcode cf_socket_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
/* The socket error may be EWOULDBLOCK or on some systems EAGAIN when
it returned due to its inability to read data without blocking.
We therefore treat both error codes the same here */
if(SOCK_EWOULDBLOCK_EAGAIN(sockerr)
if(SOCK_EAGAIN(sockerr)
#ifndef USE_WINSOCK
|| (sockerr == SOCKEINTR)
#endif

View file

@ -1138,9 +1138,9 @@ typedef unsigned int curl_bit;
#endif
#if !defined(USE_WINSOCK) && EAGAIN != SOCKEWOULDBLOCK
#define SOCK_EWOULDBLOCK_EAGAIN(e) ((e) == SOCKEWOULDBLOCK || (e) == EAGAIN)
#define SOCK_EAGAIN(e) ((e) == SOCKEWOULDBLOCK || (e) == EAGAIN)
#else
#define SOCK_EWOULDBLOCK_EAGAIN(e) ((e) == SOCKEWOULDBLOCK)
#define SOCK_EAGAIN(e) ((e) == SOCKEWOULDBLOCK)
#endif
/*

View file

@ -235,7 +235,7 @@ static int wakeup_inet(curl_socket_t socks[2], bool nonblocking)
/* The socket error may be EWOULDBLOCK or on some systems EAGAIN when
it returned due to its inability to read data without blocking.
We therefore treat both error codes the same here */
if(SOCK_EWOULDBLOCK_EAGAIN(sockerr)
if(SOCK_EAGAIN(sockerr)
#ifndef USE_WINSOCK
|| (sockerr == SOCKEINTR) || (sockerr == SOCKEINPROGRESS)
#endif
@ -320,7 +320,7 @@ int Curl_wakeup_signal(curl_socket_t socks[2])
if(err == SOCKEINTR)
continue;
#endif
if(SOCK_EWOULDBLOCK_EAGAIN(err))
if(SOCK_EAGAIN(err))
err = 0; /* wakeup is already ongoing */
}
break;
@ -344,7 +344,7 @@ CURLcode Curl_wakeup_consume(curl_socket_t socks[2], bool all)
if(err == SOCKEINTR)
continue;
#endif
if(SOCK_EWOULDBLOCK_EAGAIN(err))
if(SOCK_EAGAIN(err))
break;
result = CURLE_READ_ERROR;
break;

View file

@ -166,7 +166,7 @@ static CURLcode do_sendmsg(struct Curl_cfilter *cf,
if(!curlx_sztouz(rv, psent)) {
int err = SOCKERRNO;
if(SOCK_EWOULDBLOCK_EAGAIN(err))
if(SOCK_EAGAIN(err))
return CURLE_AGAIN;
switch(err) {
case SOCKEMSGSIZE:
@ -203,7 +203,7 @@ static CURLcode do_sendmsg(struct Curl_cfilter *cf,
;
if(!curlx_sztouz(rv, psent)) {
if(SOCK_EWOULDBLOCK_EAGAIN(SOCKERRNO)) {
if(SOCK_EAGAIN(SOCKERRNO)) {
result = CURLE_AGAIN;
goto out;
}
@ -484,7 +484,7 @@ static CURLcode recvmmsg_packets(struct Curl_cfilter *cf,
(SOCKERRNO == SOCKEINTR || SOCKERRNO == SOCKEMSGSIZE))
;
if(mcount == -1) {
if(SOCK_EWOULDBLOCK_EAGAIN(SOCKERRNO)) {
if(SOCK_EAGAIN(SOCKERRNO)) {
CURL_TRC_CF(data, cf, "ingress, recvmmsg -> EAGAIN");
goto out;
}
@ -571,7 +571,7 @@ static CURLcode recvmsg_packets(struct Curl_cfilter *cf,
(SOCKERRNO == SOCKEINTR || SOCKERRNO == SOCKEMSGSIZE))
;
if(!curlx_sztouz(rc, &nread)) {
if(SOCK_EWOULDBLOCK_EAGAIN(SOCKERRNO)) {
if(SOCK_EAGAIN(SOCKERRNO)) {
goto out;
}
if(!cf->connected && SOCKERRNO == SOCKECONNREFUSED) {
@ -641,7 +641,7 @@ static CURLcode recvfrom_packets(struct Curl_cfilter *cf,
(SOCKERRNO == SOCKEINTR || SOCKERRNO == SOCKEMSGSIZE))
;
if(!curlx_sztouz(rv, &nread)) {
if(SOCK_EWOULDBLOCK_EAGAIN(SOCKERRNO)) {
if(SOCK_EAGAIN(SOCKERRNO)) {
CURL_TRC_CF(data, cf, "ingress, recvfrom -> EAGAIN");
goto out;
}

View file

@ -46,9 +46,9 @@
#endif
#if EAGAIN != EWOULDBLOCK
#define RAW_EWOULDBLOCK_EAGAIN(e) ((e) == EWOULDBLOCK || (e) == EAGAIN)
#define RAW_EAGAIN(e) ((e) == EWOULDBLOCK || (e) == EAGAIN)
#else
#define RAW_EWOULDBLOCK_EAGAIN(e) ((e) == EWOULDBLOCK)
#define RAW_EAGAIN(e) ((e) == EWOULDBLOCK)
#endif
struct rustls_ssl_backend_data {
@ -166,7 +166,7 @@ static ssize_t tls_recv_more(struct Curl_cfilter *cf,
io_ctx.data = data;
io_error = rustls_connection_read_tls(backend->conn, read_cb, &io_ctx,
&tls_bytes_read);
if(RAW_EWOULDBLOCK_EAGAIN(io_error)) {
if(RAW_EAGAIN(io_error)) {
*err = CURLE_AGAIN;
return -1;
}
@ -276,7 +276,7 @@ static CURLcode cr_flush_out(struct Curl_cfilter *cf, struct Curl_easy *data,
while(rustls_connection_wants_write(rconn)) {
io_error = rustls_connection_write_tls(rconn, write_cb, &io_ctx,
&tlswritten);
if(RAW_EWOULDBLOCK_EAGAIN(io_error)) {
if(RAW_EAGAIN(io_error)) {
CURL_TRC_CF(data, cf, "cf_send: EAGAIN after %zu bytes",
tlswritten_total);
return CURLE_AGAIN;