mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #6860 from justinmk/coverity
coverity/155509: negative close() arg
This commit is contained in:
commit
f8e3bc63ef
@ -171,6 +171,10 @@ int os_nodetype(const char *name)
|
|||||||
| O_NONBLOCK
|
| O_NONBLOCK
|
||||||
#endif
|
#endif
|
||||||
, 0);
|
, 0);
|
||||||
|
if (fd == -1) {
|
||||||
|
return NODE_OTHER; // open() failed.
|
||||||
|
}
|
||||||
|
|
||||||
switch (uv_guess_handle(fd)) {
|
switch (uv_guess_handle(fd)) {
|
||||||
case UV_TTY: // FILE_TYPE_CHAR
|
case UV_TTY: // FILE_TYPE_CHAR
|
||||||
nodetype = NODE_WRITABLE;
|
nodetype = NODE_WRITABLE;
|
||||||
|
Loading…
Reference in New Issue
Block a user