mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +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
 | 
			
		||||
#endif
 | 
			
		||||
                   , 0);
 | 
			
		||||
  if (fd == -1) {
 | 
			
		||||
    return NODE_OTHER;  // open() failed.
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  switch (uv_guess_handle(fd)) {
 | 
			
		||||
    case UV_TTY:         // FILE_TYPE_CHAR
 | 
			
		||||
      nodetype = NODE_WRITABLE;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user