empathy r2615 - trunk/libempathy



Author: xclaesse
Date: Fri Mar  6 11:53:20 2009
New Revision: 2615
URL: http://svn.gnome.org/viewvc/empathy?rev=2615&view=rev

Log:
Use if (n != NULL) instead of if (n).

Signed-off-by: Jonny Lamb <jonny lamb collabora co uk>

Modified:
   trunk/libempathy/empathy-log-manager.c
   trunk/libempathy/empathy-log-store-empathy.c

Modified: trunk/libempathy/empathy-log-manager.c
==============================================================================
--- trunk/libempathy/empathy-log-manager.c	(original)
+++ trunk/libempathy/empathy-log-manager.c	Fri Mar  6 11:53:20 2009
@@ -369,7 +369,7 @@
 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 @@
       DEBUG ("Failed to write message: %s",
           error ? error->message : "No error message");
 
-      if (error)
+      if (error != NULL)
         g_error_free (error);
     }
 }

Modified: trunk/libempathy/empathy-log-store-empathy.c
==============================================================================
--- trunk/libempathy/empathy-log-store-empathy.c	(original)
+++ trunk/libempathy/empathy-log-store-empathy.c	Fri Mar  6 11:53:20 2009
@@ -220,7 +220,7 @@
   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 @@
   else
     {
       file = g_fopen (filename, "r+");
-      if (file)
+      if (file != NULL)
         fseek (file, - strlen (LOG_FOOTER), SEEK_END);
     }
 
@@ -242,7 +242,7 @@
   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 @@
           chat_id, chatroom, l->data);
 
       n = new_messages;
-      while (n)
+      while (n != NULL)
         {
           next = g_list_next (n);
           if (!filter (n->data, user_data))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]