Skip to content

Commit 279a078

Browse files
committed
fix: remove function all together and make it inline
1 parent d60aa5a commit 279a078

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3acc3a1f08e67dac66d91657a36d98be397fa3f14bc4798d3349605e37a90fc3 /usr/local/bin/tox-bootstrapd
1+
7c8a322c4d6ec0e26c5f8aa017ede9d39a306f1e3590928728623ab48e29f8b8 /usr/local/bin/tox-bootstrapd

toxcore/group_chats.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5020,12 +5020,6 @@ static bool custom_gc_packet_length_is_valid(uint16_t length, bool lossless)
50205020
return true;
50215021
}
50225022

5023-
/** @brief Returns false if a custom incoming (non private) packet is too large. */
5024-
static bool custom_gc_incoming_non_private_packet_length_is_valid(uint16_t length, bool lossless)
5025-
{
5026-
return length <= (lossless ? MAX_GC_CUSTOM_LOSSLESS_INCOMING_ASSEMBLED_PACKET_SIZE : MAX_GC_CUSTOM_LOSSY_PACKET_SIZE);
5027-
}
5028-
50295023
int gc_send_custom_private_packet(const GC_Chat *chat, bool lossless, uint32_t peer_id, const uint8_t *message,
50305024
uint16_t length)
50315025
{
@@ -5124,7 +5118,7 @@ non_null(1, 2, 3, 4) nullable(7)
51245118
static int handle_gc_custom_packet(const GC_Session *c, const GC_Chat *chat, const GC_Peer *peer, const uint8_t *data,
51255119
uint16_t length, bool lossless, void *userdata)
51265120
{
5127-
if (!custom_gc_incoming_non_private_packet_length_is_valid(length, lossless)) {
5121+
if (!(length <= (lossless ? MAX_GC_CUSTOM_LOSSLESS_INCOMING_ASSEMBLED_PACKET_SIZE : MAX_GC_CUSTOM_LOSSY_PACKET_SIZE))) {
51285122
return -1;
51295123
}
51305124

0 commit comments

Comments
 (0)