posix.cfg: Improved configuration of recv().

This commit is contained in:
orbitcowboy 2022-05-01 12:27:14 +02:00
parent d6af9da83d
commit 01a24d2ce0
2 changed files with 8 additions and 0 deletions

View File

@ -2261,6 +2261,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<valid>0:</valid>
</arg>
<arg nr="2" direction="out">
<not-null/>
<minsize type="argvalue" arg="3"/>
</arg>
<arg nr="3" direction="in">

View File

@ -32,6 +32,13 @@
#include <wchar.h>
#include <string.h>
ssize_t nullPointer_recv(int sockfd, void *buf, size_t len, int flags)
{
// cppcheck-suppress nullPointer
(void) recv(sockfd, NULL, len, flags);
return recv(sockfd, buf, len, flags);
}
ssize_t nullPointer_recvfrom(int sockfd, void *buf, size_t len, int flags,
struct sockaddr *src_addr, socklen_t *addrlen)
{