Skip to content

Commit

Permalink
fix: Linter
Browse files Browse the repository at this point in the history
  • Loading branch information
nickolay168 committed Sep 3, 2024
1 parent dc621ad commit 9dbb6c4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions toxav/rtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,6 @@ int rtp_send_data(RTPSession *session, const uint8_t *data, uint32_t length,
memset(rdata, 0, rdata_size);
rdata[0] = session->payload_type; // packet id == payload_type

Tox_Err_Friend_Custom_Packet error;
if (MAX_CRYPTO_DATA_SIZE > (length + RTP_HEADER_SIZE + 1)) {
/*
* The length is lesser than the maximum allowed length (including header)
Expand All @@ -816,7 +815,7 @@ int rtp_send_data(RTPSession *session, const uint8_t *data, uint32_t length,
rtp_header_pack(rdata + 1, &header);
memcpy(rdata + 1 + RTP_HEADER_SIZE, data, length);

error = rtp_send_custom_lossy_packet(session->tox, session->friend_number, rdata, rdata_size);
Tox_Err_Friend_Custom_Packet error = rtp_send_custom_lossy_packet(session->tox, session->friend_number, rdata, rdata_size);
rtp_report_error_maybe(error, session, rdata_size);
} else {
/*
Expand All @@ -830,7 +829,7 @@ int rtp_send_data(RTPSession *session, const uint8_t *data, uint32_t length,
rtp_header_pack(rdata + 1, &header);
memcpy(rdata + 1 + RTP_HEADER_SIZE, data + sent, piece);

error = rtp_send_custom_lossy_packet(session->tox, session->friend_number,
Tox_Err_Friend_Custom_Packet error = rtp_send_custom_lossy_packet(session->tox, session->friend_number,
rdata, piece + RTP_HEADER_SIZE + 1);
rtp_report_error_maybe(error, session, piece + RTP_HEADER_SIZE + 1);

Expand All @@ -846,7 +845,7 @@ int rtp_send_data(RTPSession *session, const uint8_t *data, uint32_t length,
rtp_header_pack(rdata + 1, &header);
memcpy(rdata + 1 + RTP_HEADER_SIZE, data + sent, piece);

error = rtp_send_custom_lossy_packet(session->tox, session->friend_number, rdata,
Tox_Err_Friend_Custom_Packet error = rtp_send_custom_lossy_packet(session->tox, session->friend_number, rdata,
piece + RTP_HEADER_SIZE + 1);
rtp_report_error_maybe(error, session, piece + RTP_HEADER_SIZE + 1);
}
Expand Down

0 comments on commit 9dbb6c4

Please sign in to comment.