Skip to content

Commit f4ba092

Browse files
simplify
1 parent 51c48c3 commit f4ba092

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

libcanard/canard.c

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -953,17 +953,16 @@ bool canard_unicast(canard_t* const self,
953953
const canard_bytes_chain_t payload,
954954
const canard_user_context_t context)
955955
{
956-
const bool ok = (self != NULL) && (priority < CANARD_PRIO_COUNT) && bytes_chain_valid(payload) &&
957-
(destination_node_id <= CANARD_NODE_ID_MAX);
958-
return ok && tx_1v0_service(self,
959-
deadline,
960-
priority,
961-
CANARD_SERVICE_ID_UNICAST,
962-
destination_node_id,
963-
true,
964-
self->unicast_transfer_id[destination_node_id]++,
965-
payload,
966-
context);
956+
return (self != NULL) && (destination_node_id <= CANARD_NODE_ID_MAX) &&
957+
tx_1v0_service(self,
958+
deadline,
959+
priority,
960+
CANARD_SERVICE_ID_UNICAST,
961+
destination_node_id,
962+
true,
963+
self->unicast_transfer_id[destination_node_id]++,
964+
payload,
965+
context);
967966
}
968967

969968
bool canard_1v0_publish(canard_t* const self,

0 commit comments

Comments
 (0)