posix.cfg: Added some tests for ttyname_r().

This commit is contained in:
orbitcowboy 2022-04-25 12:46:27 +02:00
parent d42bab47ae
commit dd2e218bb4
1 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,13 @@
#include <wchar.h>
#include <string.h>
int nullPointer_ttyname_r(int fd, char *buf, size_t buflen)
{
// cppcheck-suppress nullPointer
(void)ttyname_r(fd,NULL,buflen);
return ttyname_r(fd,buf,buflen);
}
size_t nullPointer_wcsnrtombs(char *restrict dest, const wchar_t **restrict src, size_t nwc, size_t len, mbstate_t *restrict ps)
{
// It is allowed to set the first arg to NULL