coverity/155509: negative close() arg

This commit is contained in:
Justin M. Keyes
2017-06-08 00:18:42 +02:00
committed by James McCoy
parent 16cce1ac17
commit cb75db4c18

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;