Skip to content

Commit fbe3c19

Browse files
committed
cleanup: correct a few nullable annotations
Both of these functions should be able to handle null data pointers
1 parent 623e3ee commit fbe3c19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

toxcore/group_chats.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,7 @@ static bool unpack_gc_sync_announce(GC_Chat *chat, const uint8_t *data, const ui
17991799
* Return -1 if the group is full or the peer failed to unpack.
18001800
* Return -2 if `peer_number` does not designate a valid peer.
18011801
*/
1802-
non_null(1, 2, 4) nullable(6)
1802+
non_null(1, 2) nullable(4, 6)
18031803
static int handle_gc_sync_response(const GC_Session *c, GC_Chat *chat, uint32_t peer_number, const uint8_t *data,
18041804
uint16_t length, void *userdata)
18051805
{
@@ -2241,7 +2241,7 @@ static bool send_gc_invite_response_reject(const GC_Chat *chat, const GC_Connect
22412241
* Return -3 if we fail to send an invite response.
22422242
* Return -4 if peer_number does not designate a valid peer.
22432243
*/
2244-
non_null()
2244+
non_null(1) nullable(3)
22452245
static int handle_gc_invite_request(GC_Chat *chat, uint32_t peer_number, const uint8_t *data, uint16_t length)
22462246
{
22472247
if (chat->shared_state.version == 0) { // we aren't synced yet; ignore request

0 commit comments

Comments
 (0)