mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-21 11:13:30 +00:00
check return value of ttyname_r().
This commit is contained in:
parent
db297254fe
commit
532e65b886
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=146451
@ -124,7 +124,8 @@ ttyname(int fd)
|
||||
return (NULL);
|
||||
}
|
||||
}
|
||||
ttyname_r(fd, buf, sizeof(_PATH_DEV) + MAXNAMLEN);
|
||||
if (ttyname_r(fd, buf, sizeof(_PATH_DEV) + MAXNAMLEN) != 0)
|
||||
return (NULL);
|
||||
return (buf);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user