aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth Jackson <sethjackson@gmail.com>2015-12-21 15:09:39 -0500
committerSeth Jackson <sethjackson@gmail.com>2015-12-21 15:21:21 -0500
commit53a1db1a10e811018ac3334b46215e46a9778c12 (patch)
treec9b6ded76959bdb4b159d7e15ce40531da368d40
parent376b973a0ae77243acdc15d1c786ea1f40aeb8a4 (diff)
downloadrneovim-53a1db1a10e811018ac3334b46215e46a9778c12.tar.gz
rneovim-53a1db1a10e811018ac3334b46215e46a9778c12.tar.bz2
rneovim-53a1db1a10e811018ac3334b46215e46a9778c12.zip
Windows: Fix cast in if_cscope.c.
-rw-r--r--src/nvim/if_cscope.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c
index 3585c26ca2..981a6c1c90 100644
--- a/src/nvim/if_cscope.c
+++ b/src/nvim/if_cscope.c
@@ -861,17 +861,16 @@ err_closing:
csinfo[i].hProc = pi.hProcess;
CloseHandle(pi.hThread);
- /* TODO - tidy up after failure to create files on pipe handles. */
- if (((fd = _open_osfhandle((OPEN_OH_ARGTYPE)stdin_wr,
- _O_TEXT|_O_APPEND)) < 0)
- || ((csinfo[i].to_fp = _fdopen(fd, "w")) == NULL))
+ // TODO(neovim): tidy up after failure to create files on pipe handles.
+ if (((fd = _open_osfhandle((intptr_t)stdin_wr, _O_TEXT|_O_APPEND)) < 0)
+ || ((csinfo[i].to_fp = _fdopen(fd, "w")) == NULL)) {
PERROR(_("cs_create_connection: fdopen for to_fp failed"));
- if (((fd = _open_osfhandle((OPEN_OH_ARGTYPE)stdout_rd,
- _O_TEXT|_O_RDONLY)) < 0)
- || ((csinfo[i].fr_fp = _fdopen(fd, "r")) == NULL))
+ }
+ if (((fd = _open_osfhandle((intptr_t)stdout_rd, _O_TEXT|_O_RDONLY)) < 0)
+ || ((csinfo[i].fr_fp = _fdopen(fd, "r")) == NULL)) {
PERROR(_("cs_create_connection: fdopen for fr_fp failed"));
-
- /* Close handles for file descriptors inherited by the cscope process */
+ }
+ // Close handles for file descriptors inherited by the cscope process.
CloseHandle(stdin_rd);
CloseHandle(stdout_wr);