From b4ff583277ce16584f20868cef6697f52bebc7d4 Mon Sep 17 00:00:00 2001 From: erw7 Date: Fri, 15 Nov 2019 13:12:48 +0900 Subject: Minor changes in reviewer's point --- src/nvim/os/os_win_conpty.c | 3 +++ src/nvim/os/pty_process_win.c | 8 +++----- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src') 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 #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; -- cgit