[coverity] fix unchecked return
This commit is contained in:
parent
122a35fb73
commit
0c9fb50170
@ -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,
|
if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (void*)&option_value,
|
||||||
sizeof(option_value)) == -1)
|
sizeof(option_value)) == -1)
|
||||||
WLog_ERR(TAG, "setsockopt");
|
WLog_ERR(TAG, "setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR)");
|
||||||
|
|
||||||
#ifndef _WIN32
|
#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
|
#else
|
||||||
arg = 1;
|
arg = 1;
|
||||||
ioctlsocket(sockfd, FIONBIO, &arg);
|
ioctlsocket(sockfd, FIONBIO, &arg);
|
||||||
|
@ -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)
|
static BOOL attribute_allocate_attribute_array(CK_ATTRIBUTE_PTR attribute)
|
||||||
{
|
{
|
||||||
|
WINPR_ASSERT(attribute);
|
||||||
attribute->pValue = calloc(attribute->ulValueLen, sizeof(void*));
|
attribute->pValue = calloc(attribute->ulValueLen, sizeof(void*));
|
||||||
return !!attribute->pValue;
|
return !!attribute->pValue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user