mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-29 01:56:21 +00:00
Use null check convention in chat_session.c
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user