diff --git a/include/mastodont_chats.h b/include/mastodont_chats.h index 528c07a..0bb3ce0 100644 --- a/include/mastodont_chats.h +++ b/include/mastodont_chats.h @@ -79,7 +79,7 @@ int mastodont_get_chat(mastodont_t* data, struct mstdnt_storage* storage, struct mstdnt_chat* chat); -void mstdnt_cleanup_chats(struct mstdnt_chat* chats, size_t chats_len); -void mstdnt_cleanup_messages(struct mstdnt_message* chats, size_t messages_len); +void mstdnt_cleanup_chats(struct mstdnt_chat* chats); +void mstdnt_cleanup_messages(struct mstdnt_message* chats); #endif // MASTODONT_CHATS_H diff --git a/include/mastodont_emoji.h b/include/mastodont_emoji.h index 708bcd3..99fc2a2 100644 --- a/include/mastodont_emoji.h +++ b/include/mastodont_emoji.h @@ -47,7 +47,6 @@ void _mstdnt_val_emojis_call(cJSON* v, void* _type); void _mstdnt_val_emoji_reactions_call(cJSON* v, void* _type); void cleanup_emoji_reaction(struct mstdnt_emoji_reaction* reactions); void cleanup_emoji_reactions(struct mstdnt_emoji_reaction* reactions, size_t s); -// TODO add length for compatibility void cleanup_emojis(struct mstdnt_emoji* emo); #endif /* MASTODONT_EMOJI */ diff --git a/src/chats.c b/src/chats.c index 5af0e40..4663afb 100644 --- a/src/chats.c +++ b/src/chats.c @@ -198,17 +198,14 @@ int mastodont_get_chat(mastodont_t* data, return mastodont_request(data, m_args, &req_args); } -void mstdnt_cleanup_chats(struct mstdnt_chat* chats, size_t chats_len) +void mstdnt_cleanup_chats(struct mstdnt_chat* chats) { - // Unused for compatibility - (void)chats_len; if (!chats) return; free(chats); } -void mstdnt_cleanup_messages(struct mstdnt_message* messages, size_t messages_len) +void mstdnt_cleanup_messages(struct mstdnt_message* messages) { - (void)messages_len; - if (!chats) return; + if (!messages) return; mstdnt_cleanup_emojis(messages->emojis); }