Skip to content

Commit 4625e0a

Browse files
committed
simplify function
1 parent 4e5992d commit 4625e0a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

toxcore/group_chats.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4997,8 +4997,7 @@ static bool custom_gc_packet_length_is_valid(uint16_t length, bool lossless)
49974997
/** @brief Returns false if a custom incoming (non private) packet is too large. */
49984998
static bool custom_gc_incoming_non_private_packet_length_is_valid(uint16_t length, bool lossless)
49994999
{
5000-
return lossless ? length <= MAX_GC_CUSTOM_LOSSLESS_INCOMING_ASSEMBLED_PACKET_SIZE
5001-
: length <= MAX_GC_CUSTOM_LOSSY_PACKET_SIZE;
5000+
return length <= (lossless ? MAX_GC_CUSTOM_LOSSLESS_INCOMING_ASSEMBLED_PACKET_SIZE : MAX_GC_CUSTOM_LOSSY_PACKET_SIZE);
50025001
}
50035002

50045003
int gc_send_custom_private_packet(const GC_Chat *chat, bool lossless, uint32_t peer_id, const uint8_t *message,

0 commit comments

Comments
 (0)