Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
serges147 committed May 6, 2024
1 parent 89b1103 commit af3ae32
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions libcanard/canard.h
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,10 @@ int8_t canardRxUnsubscribe(CanardInstance* const ins,
///
/// The time complexity is logarithmic from the number of current subscriptions under the specified transfer kind.
/// This function does not allocate new memory.
int8_t canardRxGetSubscription(CanardInstance* const ins,
const CanardTransferKind transfer_kind,
const CanardPortID port_id,
CanardRxSubscription** const out_subscription);
int8_t canardRxGetSubscription(CanardInstance* const ins,
const CanardTransferKind transfer_kind,
const CanardPortID port_id,
CanardRxSubscription** const out_subscription);

/// Utilities for generating CAN controller hardware acceptance filter configurations
/// to accept specific subjects, services, or nodes.
Expand Down
5 changes: 3 additions & 2 deletions tests/test_public_rx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,10 @@ TEST_CASE("RxSubscriptionErrors")

// These calls should not touch `fake_ptr`!
//
CanardRxSubscription fake_sub{};
CanardRxSubscription fake_sub{};
CanardRxSubscription* fake_ptr = &fake_sub;
REQUIRE(-CANARD_ERROR_INVALID_ARGUMENT == canardRxGetSubscription(nullptr, CanardTransferKindMessage, 0, &fake_ptr));
REQUIRE(-CANARD_ERROR_INVALID_ARGUMENT ==
canardRxGetSubscription(nullptr, CanardTransferKindMessage, 0, &fake_ptr));
REQUIRE(fake_ptr == &fake_sub);
REQUIRE(-CANARD_ERROR_INVALID_ARGUMENT == canardRxGetSubscription(&ins.getInstance(), kind.value, 0, &fake_ptr));
REQUIRE(fake_ptr == &fake_sub);
Expand Down

0 comments on commit af3ae32

Please sign in to comment.