unix: replace magic number with UV_SPAWN_BUFFER_SIZE
Replaced the hardcoded buffer size (64 * 1024) with the defined constant `UV_SPAWN_BUFFER_SIZE` for better readability and maintainability.
This commit is contained in:
parent
6889c552e5
commit
73770ceb52
@ -1049,7 +1049,7 @@ static void uv__read(uv_stream_t* stream) {
|
||||
assert(stream->alloc_cb != NULL);
|
||||
|
||||
buf = uv_buf_init(NULL, 0);
|
||||
stream->alloc_cb((uv_handle_t*)stream, 64 * 1024, &buf);
|
||||
stream->alloc_cb((uv_handle_t*)stream, UV_SPAWN_BUFFER_SIZE, &buf);
|
||||
if (buf.base == NULL || buf.len == 0) {
|
||||
/* User indicates it can't or won't handle the read. */
|
||||
stream->read_cb(stream, UV_ENOBUFS, &buf);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user