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);
else
{
file = g_fopen (filename, "r+");
- if (file)
+ if (file != NULL)
fseek (file, - strlen (LOG_FOOTER), SEEK_END);
}
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,
chat_id, chatroom, l->data);
n = new_messages;
- while (n)
+ while (n != NULL)
{
next = g_list_next (n);
if (!filter (n->data, user_data))