Skip to content

Commit dd2e218

Browse files
committed
posix.cfg: Added some tests for ttyname_r().
1 parent d42bab4 commit dd2e218

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

test/cfg/posix.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@
3131
#include <wchar.h>
3232
#include <string.h>
3333

34+
int nullPointer_ttyname_r(int fd, char *buf, size_t buflen)
35+
{
36+
// cppcheck-suppress nullPointer
37+
(void)ttyname_r(fd,NULL,buflen);
38+
return ttyname_r(fd,buf,buflen);
39+
}
40+
3441
size_t nullPointer_wcsnrtombs(char *restrict dest, const wchar_t **restrict src, size_t nwc, size_t len, mbstate_t *restrict ps)
3542
{
3643
// It is allowed to set the first arg to NULL

0 commit comments

Comments
 (0)