mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
check return value of ttyname_r().
This commit is contained in:
parent
db297254fe
commit
532e65b886
1 changed files with 2 additions and 1 deletions
|
|
@ -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 a new issue