diff options
-rw-r--r-- | src/nvim/os/os_win_conpty.c | 3 | ||||
-rw-r--r-- | src/nvim/os/pty_process_win.c | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/os/os_win_conpty.c b/src/nvim/os/os_win_conpty.c index bf6ec62818..887286b59f 100644 --- a/src/nvim/os/os_win_conpty.c +++ b/src/nvim/os/os_win_conpty.c @@ -1,3 +1,6 @@ +// This is an open source non-commercial project. Dear PVS-Studio, please check +// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com + #include <uv.h> #include "nvim/vim.h" diff --git a/src/nvim/os/pty_process_win.c b/src/nvim/os/pty_process_win.c index ffdececf94..0cd730401a 100644 --- a/src/nvim/os/pty_process_win.c +++ b/src/nvim/os/pty_process_win.c @@ -183,11 +183,9 @@ int pty_process_spawn(PtyProcess *ptyproc) uv_run(&proc->loop->uv, UV_RUN_ONCE); } - if (ptyproc->type == PTY_TYPE_CONPTY) { - ptyproc->object.conpty = conpty_object; - } else { - ptyproc->object.winpty = winpty_object; - } + (ptyproc->type == PTY_TYPE_CONPTY) ? + (void *)(ptyproc->object.conpty = conpty_object) : + (void *)(ptyproc->object.winpty = winpty_object); ptyproc->process_handle = process_handle; winpty_object = NULL; conpty_object = NULL; |