aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy/empathy-log-manager.c4
-rw-r--r--libempathy/empathy-log-store-empathy.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/libempathy/empathy-log-manager.c b/libempathy/empathy-log-manager.c
index 78f5c15eb..176d80e44 100644
--- a/libempathy/empathy-log-manager.c
+++ b/libempathy/empathy-log-manager.c
@@ -369,7 +369,7 @@ empathy_log_manager_search_new (EmpathyLogManager *manager,
void
empathy_log_manager_search_hit_free (EmpathyLogSearchHit *hit)
{
- if (hit->account)
+ if (hit->account != NULL)
g_object_unref (hit->account);
g_free (hit->date);
@@ -423,7 +423,7 @@ log_manager_chat_received_message_cb (EmpathyTpChat *tp_chat,
DEBUG ("Failed to write message: %s",
error ? error->message : "No error message");
- if (error)
+ if (error != NULL)
g_error_free (error);
}
}
diff --git a/libempathy/empathy-log-store-empathy.c b/libempathy/empathy-log-store-empathy.c
index c35a403d6..3a924aa53 100644
--- a/libempathy/empathy-log-store-empathy.c
+++ b/libempathy/empathy-log-store-empathy.c
@@ -220,7 +220,7 @@ log_store_empathy_add_message (EmpathyLogStore *self,
if (!g_file_test (filename, G_FILE_TEST_EXISTS))
{
file = g_fopen (filename, "w+");
- if (file)
+ if (file != NULL)
g_fprintf (file, LOG_HEADER);
g_chmod (filename, LOG_FILE_CREATE_MODE);
@@ -228,7 +228,7 @@ log_store_empathy_add_message (EmpathyLogStore *self,
else
{
file = g_fopen (filename, "r+");
- if (file)
+ if (file != NULL)
fseek (file, - strlen (LOG_FOOTER), SEEK_END);
}
@@ -242,7 +242,7 @@ log_store_empathy_add_message (EmpathyLogStore *self,
contact_id = g_markup_escape_text (str, -1);
avatar = empathy_contact_get_avatar (sender);
- if (avatar)
+ if (avatar != NULL)
avatar_token = g_markup_escape_text (avatar->token, -1);
g_fprintf (file,
@@ -730,7 +730,7 @@ log_store_empathy_get_filtered_messages (EmpathyLogStore *self,
chat_id, chatroom, l->data);
n = new_messages;
- while (n)
+ while (n != NULL)
{
next = g_list_next (n);
if (!filter (n->data, user_data))