Skip to content

Commit

Permalink
[coverity] fix unchecked return
Browse files Browse the repository at this point in the history
  • Loading branch information
akallabeth committed Apr 12, 2024
1 parent 122a35f commit 0c9fb50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libfreerdp/core/listener.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions winpr/libwinpr/ncrypt/ncrypt_pkcs11.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0c9fb50

Please sign in to comment.