Skip to content

Commit a48f9bb

Browse files
committed
fix sonar errors
1 parent e7dd3a5 commit a48f9bb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

libcanard/canard.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@
4343
#define CAVL2_T struct CanardTreeNode
4444
#define CAVL2_ASSERT(x) CANARD_ASSERT(x) // NOSONAR
4545
#include <cavl2.h>
46-
#include <stdio.h>
47-
#include <stdlib.h>
4846

4947
// --------------------------------------------- COMMON DEFINITIONS ---------------------------------------------
5048

@@ -1389,7 +1387,7 @@ int8_t canardRxSubscribe(struct CanardInstance* const ins,
13891387
const size_t tk = (size_t) transfer_kind;
13901388

13911389
if ((ins != NULL) && (out_subscription != NULL) && (tk < CANARD_NUM_TRANSFER_KINDS) &&
1392-
((transfer_kind == CanardTransferKindMessage && port_id <= CANARD_SUBJECT_ID_MAX) ||
1390+
(((transfer_kind == CanardTransferKindMessage) && (port_id <= CANARD_SUBJECT_ID_MAX)) ||
13931391
(port_id <= CANARD_SERVICE_ID_MAX)))
13941392
{
13951393
// Reset to the initial state. This is absolutely critical because the new payload size limit may be larger

0 commit comments

Comments
 (0)