mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-23 07:46:22 +00:00
refactor: Refactor OMEMO error handling and add non-null attributes
Add __attribute__((nonnull) hints to omemo_receive_message and omemo_on_message_recv declarations to catch NULL arguments at compiletime. So we can set the error state unconditionally in the functions.
This commit is contained in:
@@ -45,4 +45,4 @@ void omemo_bundle_publish(gboolean first);
|
||||
void omemo_bundle_request(const char* const jid, uint32_t device_id, ProfIqCallback func, ProfIqFreeCallback free_func, void* userdata);
|
||||
int omemo_start_device_session_handle_bundle(xmpp_stanza_t* const stanza, void* const userdata);
|
||||
|
||||
char* omemo_receive_message(xmpp_stanza_t* const stanza, gboolean* trusted, omemo_error_t* error);
|
||||
char* omemo_receive_message(xmpp_stanza_t* const stanza, gboolean* trusted, omemo_error_t* error) __attribute__((nonnull(2, 3)));
|
||||
|
||||
Reference in New Issue
Block a user