RISC-V: isatty: return 0 on error

This commit is contained in:
Chih-Mao Chen 2017-11-16 16:08:16 +08:00 committed by Corinna Vinschen
parent cba678ba02
commit f2c9e55faf
1 changed files with 1 additions and 1 deletions

View File

@ -13,5 +13,5 @@ _isatty(int file)
{
struct stat s;
int ret = _fstat (file, &s);
return ret == -1 ? -1 : !!(s.st_mode & S_IFCHR);
return ret == -1 ? 0 : !!(s.st_mode & S_IFCHR);
}