1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Use null check convention in chat_session.c

This commit is contained in:
James Booth 2015-05-04 23:24:37 +01:00
parent c487fe5f77
commit 49e450767d

View File

@ -64,7 +64,7 @@ _chat_session_new(const char * const barejid, const char * const resource,
static void static void
_chat_session_free(ChatSession *session) _chat_session_free(ChatSession *session)
{ {
if (session != NULL) { if (session) {
free(session->barejid); free(session->barejid);
free(session->resource); free(session->resource);
free(session); free(session);
@ -81,7 +81,7 @@ chat_sessions_init(void)
void void
chat_sessions_clear(void) chat_sessions_clear(void)
{ {
if (sessions != NULL) if (sessions)
g_hash_table_remove_all(sessions); g_hash_table_remove_all(sessions);
} }