Skip to content

Commit e1c9913

Browse files
committed
add const pointer
1 parent e7154c7 commit e1c9913

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libcanard/canard.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ CANARD_PRIVATE ptrdiff_t txAVLPriorityPredicate( //
347347
/// This ensures that CAN frames with the same deadline are, when timed out, dropped in the FIFO order.
348348
/// Frames that should be dropped earlier compare smaller (i.e., put on the left side of the tree).
349349
CANARD_PRIVATE ptrdiff_t txAVLDeadlinePredicate( //
350-
const void* user_reference, // NOSONAR Cavl API requires pointer to non-const.
350+
const void* const user_reference, // NOSONAR Cavl API requires pointer to non-const.
351351
const struct CanardTreeNode* const node)
352352
{
353353
typedef struct CanardTxQueueItem TxItem;
@@ -1103,7 +1103,7 @@ CANARD_PRIVATE int8_t rxAcceptFrame(struct CanardInstance* const ins,
11031103
}
11041104

11051105
CANARD_PRIVATE ptrdiff_t
1106-
rxSubscriptionPredicateOnPortID(const void* user_reference, // NOSONAR Cavl API requires pointer to non-const.
1106+
rxSubscriptionPredicateOnPortID(const void* const user_reference, // NOSONAR Cavl API requires pointer to non-const.
11071107
const struct CanardTreeNode* const node)
11081108
{
11091109
CANARD_ASSERT((user_reference != NULL) && (node != NULL));
@@ -1115,7 +1115,7 @@ rxSubscriptionPredicateOnPortID(const void* user_reference, // NOSONAR Cavl API
11151115
}
11161116

11171117
CANARD_PRIVATE ptrdiff_t
1118-
rxSubscriptionPredicateOnStruct(const void* user_reference, // NOSONAR Cavl API requires pointer to non-const.
1118+
rxSubscriptionPredicateOnStruct(const void* const user_reference, // NOSONAR Cavl API requires pointer to non-const.
11191119
const struct CanardTreeNode* const node)
11201120
{
11211121
return rxSubscriptionPredicateOnPortID( //
@@ -1405,7 +1405,7 @@ int8_t canardRxSubscribe(struct CanardInstance* const ins,
14051405
const struct CanardTreeNode* const res = cavl2_find_or_insert(&ins->rx_subscriptions[tk],
14061406
&out_subscription->base,
14071407
&rxSubscriptionPredicateOnStruct,
1408-
out_subscription,
1408+
&out_subscription->base,
14091409
&cavl2_trivial_factory);
14101410
(void) res;
14111411
CANARD_ASSERT(res == &out_subscription->base);

0 commit comments

Comments
 (0)