mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 22:48:34 +00:00
coverity/155509: negative close() arg
This commit is contained in:

committed by
James McCoy

parent
16cce1ac17
commit
cb75db4c18
@@ -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;
|
||||||
|
Reference in New Issue
Block a user