]> git.0d.be Git - empathy.git/commitdiff
Use g_list_concat even if the current GList is empty (NULL).
authorJonny Lamb <jonny.lamb@collabora.co.uk>
Fri, 6 Mar 2009 11:51:52 +0000 (11:51 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Fri, 6 Mar 2009 11:51:52 +0000 (11:51 +0000)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
svn path=/trunk/; revision=2588

libempathy/empathy-log-manager.c

index 2a12596590ee2c1e2b825fb9732eadb3a74319ba..46463733fbe315d4150fcaa7ee2e11bb68d563a7 100644 (file)
@@ -236,12 +236,8 @@ empathy_log_manager_get_messages_for_date (EmpathyLogManager *manager,
     {
       EmpathyLogSource *source = EMPATHY_LOG_SOURCE (l->data);
 
-      if (!out)
-        out = empathy_log_source_get_messages_for_date (source, account,
-            chat_id, chatroom, date);
-      else
-        out = g_list_concat (out, empathy_log_source_get_messages_for_date (
-              source, account, chat_id, chatroom, date));
+      out = g_list_concat (out, empathy_log_source_get_messages_for_date (
+          source, account, chat_id, chatroom, date));
     }
 
   return out;
@@ -290,11 +286,8 @@ empathy_log_manager_get_chats (EmpathyLogManager *manager,
     {
       EmpathyLogSource *source = EMPATHY_LOG_SOURCE (l->data);
 
-      if (!out)
-        out = empathy_log_source_get_chats (source, account);
-      else
-        out = g_list_concat (out,
-            empathy_log_source_get_chats (source, account));
+      out = g_list_concat (out,
+          empathy_log_source_get_chats (source, account));
     }
 
   return out;
@@ -316,11 +309,8 @@ empathy_log_manager_search_new (EmpathyLogManager *manager,
     {
       EmpathyLogSource *source = EMPATHY_LOG_SOURCE (l->data);
 
-      if (!out)
-        out = empathy_log_source_search_new (source, text);
-      else
-        out = g_list_concat (out,
-            empathy_log_source_search_new (source, text));
+      out = g_list_concat (out,
+          empathy_log_source_search_new (source, text));
     }
 
   return out;