[coverity] fix unchecked return

This commit is contained in:
akallabeth 2024-04-12 13:16:40 +02:00 committed by akallabeth
parent 122a35fb73
commit 0c9fb50170
2 changed files with 4 additions and 2 deletions

View File

@ -188,10 +188,11 @@ static BOOL freerdp_listener_open(freerdp_listener* instance, const char* bind_a
if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (void*)&option_value,
sizeof(option_value)) == -1)
WLog_ERR(TAG, "setsockopt");
WLog_ERR(TAG, "setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR)");
#ifndef _WIN32
fcntl(sockfd, F_SETFL, O_NONBLOCK);
if (fcntl(sockfd, F_SETFL, O_NONBLOCK) != 0)
WLog_ERR(TAG, "fcntl(sockfd, F_SETFL, O_NONBLOCK)");
#else
arg = 1;
ioctlsocket(sockfd, FIONBIO, &arg);

View File

@ -141,6 +141,7 @@ static BOOL attributes_have_unallocated_buffers(CK_ATTRIBUTE_PTR attributes, CK_
static BOOL attribute_allocate_attribute_array(CK_ATTRIBUTE_PTR attribute)
{
WINPR_ASSERT(attribute);
attribute->pValue = calloc(attribute->ulValueLen, sizeof(void*));
return !!attribute->pValue;
}