aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/os/wstream.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/os/wstream.c b/src/nvim/os/wstream.c
index 6a650ce775..90d4ebeec8 100644
--- a/src/nvim/os/wstream.c
+++ b/src/nvim/os/wstream.c
@@ -116,9 +116,8 @@ void wstream_set_stream(WStream *wstream, uv_stream_t *stream)
/// @param file The file descriptor
void wstream_set_file(WStream *wstream, uv_file file)
{
- uv_handle_type type = uv_guess_handle(file);
-
- assert(type == UV_NAMED_PIPE || type == UV_TTY);
+ assert(uv_guess_handle(file) == UV_NAMED_PIPE ||
+ uv_guess_handle(file) == UV_TTY);
wstream->stream = xmalloc(sizeof(uv_pipe_t));
uv_pipe_init(uv_default_loop(), (uv_pipe_t *)wstream->stream, 0);
uv_pipe_open((uv_pipe_t *)wstream->stream, file);