lib: use SOCKET_WRITABLE()/SOCKET_READABLE() where possible

Closes #20052
This commit is contained in:
Viktor Szakats 2025-12-20 18:50:12 +01:00
parent 94a57b4e15
commit b5aafb81df
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
4 changed files with 4 additions and 8 deletions

View file

@ -2086,8 +2086,7 @@ static CURLcode cf_tcp_accept_connect(struct Curl_cfilter *cf,
CURL_TRC_CF(data, cf, "Checking for incoming on fd=%" FMT_SOCKET_T
" ip=%s:%d", ctx->sock, ctx->ip.local_ip, ctx->ip.local_port);
socketstate = Curl_socket_check(ctx->sock, CURL_SOCKET_BAD,
CURL_SOCKET_BAD, 0);
socketstate = SOCKET_READABLE(ctx->sock, 0);
CURL_TRC_CF(data, cf, "socket_check -> %x", socketstate);
switch(socketstate) {
case -1: /* error */