aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2009-03-06 19:53:20 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-03-06 19:53:20 +0800
commite3528df858ef8a297d5b7d4e3446e53e71403ec8 (patch)
tree00d222959e8e7dba4f44d86c188537d0a6bc702c
parentc79a4dd6ecc739e5bca37cc8401bddc5c8a6c176 (diff)
downloadgsoc2013-empathy-e3528df858ef8a297d5b7d4e3446e53e71403ec8.tar
gsoc2013-empathy-e3528df858ef8a297d5b7d4e3446e53e71403ec8.tar.gz
gsoc2013-empathy-e3528df858ef8a297d5b7d4e3446e53e71403ec8.tar.bz2
gsoc2013-empathy-e3528df858ef8a297d5b7d4e3446e53e71403ec8.tar.lz
gsoc2013-empathy-e3528df858ef8a297d5b7d4e3446e53e71403ec8.tar.xz
gsoc2013-empathy-e3528df858ef8a297d5b7d4e3446e53e71403ec8.tar.zst
gsoc2013-empathy-e3528df858ef8a297d5b7d4e3446e53e71403ec8.zip
Use if (n != NULL) instead of if (n).
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk> svn path=/trunk/; revision=2615
-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))