From 7eca15d17aca07ece21cf14a150454d4f11de8f9 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sun, 30 Dec 2018 19:35:10 +0100 Subject: [PATCH] unix: rename WRITE_RETRY_ON_ERROR macro PR-URL: https://github.com/libuv/libuv/pull/2097 Reviewed-By: Santiago Gimeno --- src/unix/stream.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/unix/stream.c b/src/unix/stream.c index 2e84eeeb828..a7a92add05e 100644 --- a/src/unix/stream.c +++ b/src/unix/stream.c @@ -58,11 +58,11 @@ struct uv__stream_select_s { fd_set* swrite; size_t swrite_sz; }; -# define WRITE_RETRY_ON_ERROR(send_handle) \ +# define IS_TRANSIENT_WRITE_ERROR(errno, send_handle) \ (errno == EAGAIN || errno == EWOULDBLOCK || errno == ENOBUFS || \ - (errno == EMSGSIZE && send_handle)) + (errno == EMSGSIZE && send_handle != NULL)) #else -# define WRITE_RETRY_ON_ERROR(send_handle) \ +# define IS_TRANSIENT_WRITE_ERROR(errno, send_handle) \ (errno == EAGAIN || errno == EWOULDBLOCK || errno == ENOBUFS) #endif /* defined(__APPLE__) */ @@ -868,7 +868,7 @@ static void uv__write(uv_stream_t* stream) { } if (n < 0) { - if (!WRITE_RETRY_ON_ERROR(req->send_handle)) { + if (!IS_TRANSIENT_WRITE_ERROR(errno, req->send_handle)) { err = UV__ERR(errno); goto error; } else if (stream->flags & UV_HANDLE_BLOCKING_WRITES) {