avrcp_target: avoid warning without bstack_assert

This commit is contained in:
Matthias Ringwald 2020-12-14 11:49:57 +01:00
parent cc92f22bee
commit ef6e8e6376

View File

@ -1024,9 +1024,9 @@ static int avrcp_target_send_notification(uint16_t cid, avrcp_connection_t * con
uint16_t pos = 0;
l2cap_reserve_packet_buffer();
uint8_t * packet = l2cap_get_outgoing_buffer();
uint16_t size = l2cap_get_remote_mtu_for_local_cid(connection->l2cap_signaling_cid);
btstack_assert((14 + value_len) <= size);
// value <= 8 ==> pdu <= 22 < L2CAP Default MTU
btstack_assert((14 + value_len) <= l2cap_get_remote_mtu_for_local_cid(connection->l2cap_signaling_cid));
connection->packet_type = AVRCP_SINGLE_PACKET;
packet[pos++] = (connection->transaction_id << 4) | (connection->packet_type << 2) | (AVRCP_RESPONSE_FRAME << 1) | 0;