mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-25 15:41:00 +00:00
mesh: fix warnings without asserts
This commit is contained in:
parent
20cc5dae5d
commit
d4e23df00f
@ -988,8 +988,7 @@ void mesh_network_send_pdu(mesh_network_pdu_t * network_pdu){
|
||||
printf("^^ into network_pdus_queued\n");
|
||||
#endif
|
||||
|
||||
uint8_t net_mic_len = network_pdu->data[1] & 0x80 ? 8 : 4;
|
||||
btstack_assert((network_pdu->len + net_mic_len) <= 29);
|
||||
btstack_assert((network_pdu->len + (network_pdu->data[1] & 0x80 ? 8 : 4)) <= 29);
|
||||
btstack_assert(network_pdu->len >= 9);
|
||||
|
||||
// setup callback
|
||||
|
@ -1008,9 +1008,9 @@ void mesh_upper_transport_init(){
|
||||
|
||||
void mesh_upper_transport_send_access_pdu(mesh_pdu_t *pdu){
|
||||
if (pdu->pdu_type == MESH_PDU_TYPE_NETWORK){
|
||||
mesh_network_pdu_t * network_pdu = (mesh_network_pdu_t *) pdu;
|
||||
btstack_assert(network_pdu->len >= 9);
|
||||
btstack_assert(mesh_network_pdu_len((mesh_network_pdu_t *) pdu) >= 9);
|
||||
}
|
||||
|
||||
btstack_linked_list_add_tail(&upper_transport_outgoing, (btstack_linked_item_t*) pdu);
|
||||
mesh_upper_transport_run();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user