From 49e450767db2c9d025fe124b824226849bb2bea1 Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 4 May 2015 23:24:37 +0100 Subject: [PATCH] Use null check convention in chat_session.c --- src/chat_session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chat_session.c b/src/chat_session.c index 8ce2e437..2758d603 100644 --- a/src/chat_session.c +++ b/src/chat_session.c @@ -64,7 +64,7 @@ _chat_session_new(const char * const barejid, const char * const resource, static void _chat_session_free(ChatSession *session) { - if (session != NULL) { + if (session) { free(session->barejid); free(session->resource); free(session); @@ -81,7 +81,7 @@ chat_sessions_init(void) void chat_sessions_clear(void) { - if (sessions != NULL) + if (sessions) g_hash_table_remove_all(sessions); }