diff --git a/libfreerdp/core/listener.c b/libfreerdp/core/listener.c index b03e9b83f..a7592da13 100644 --- a/libfreerdp/core/listener.c +++ b/libfreerdp/core/listener.c @@ -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); diff --git a/winpr/libwinpr/ncrypt/ncrypt_pkcs11.c b/winpr/libwinpr/ncrypt/ncrypt_pkcs11.c index 5f396b180..d579cb198 100644 --- a/winpr/libwinpr/ncrypt/ncrypt_pkcs11.c +++ b/winpr/libwinpr/ncrypt/ncrypt_pkcs11.c @@ -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; }