1
0
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:
Hajimu UMEMOTO 2005-05-20 14:59:20 +00:00
parent db297254fe
commit 532e65b886
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=146451

View File

@ -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);
}