Merge pull request #6860 from justinmk/coverity

coverity/155509: negative close() arg
This commit is contained in:
James McCoy 2017-06-15 12:55:05 +00:00 committed by GitHub
commit f8e3bc63ef

View File

@ -171,6 +171,10 @@ int os_nodetype(const char *name)
| O_NONBLOCK
#endif
, 0);
if (fd == -1) {
return NODE_OTHER; // open() failed.
}
switch (uv_guess_handle(fd)) {
case UV_TTY: // FILE_TYPE_CHAR
nodetype = NODE_WRITABLE;