mirror of
https://github.com/obgm/libcoap.git
synced 2026-12-05 20:02:19 +03:00
Coverity: Fix CID 1483550, 1670422-1670425
CID 1594475 is a false positive as multiple threads cannot execute in the same code as global_lock is set.
This commit is contained in:
1 parent
0a48ceec41
commit
80c37b7bc6
4 files changed
+17
-14
No files matched your search
@@ -19,6 +19,13 @@
|
||||
CU_ASSERT_PTR_NOT_NULL(value); \
|
||||
if ((void*)value == NULL) return;
|
||||
|
||||
#define ReturnIf_CU_ASSERT_PTR_NOT_NULL_Code(value,code) \
|
||||
CU_ASSERT_PTR_NOT_NULL(value); \
|
||||
if ((void*)value == NULL) { \
|
||||
code; \
|
||||
return; \
|
||||
}
|
||||
|
||||
static coap_context_t *ctx; /* Holds the coap context for most tests */
|
||||
static coap_session_t *session; /* Holds a reference-counted session object */
|
||||
|
||||
@@ -296,7 +303,7 @@ t_sendqueue11(void) {
|
||||
COAP_REQUEST_CODE_GET,
|
||||
0x1234,
|
||||
64);
|
||||
ReturnIf_CU_ASSERT_PTR_NOT_NULL(sent_pdu);
|
||||
ReturnIf_CU_ASSERT_PTR_NOT_NULL_Code(sent_pdu, coap_delete_node(queued));
|
||||
|
||||
queued->next = NULL;
|
||||
queued->session = coap_session_reference(session);
|
||||
|
||||
Reference in new issue
Block a user