[Telepathy-commits] [telepathy-gabble/master] conn-presence: construct_contact_statuses_cb: reindent and use tp_g_value_slice_new

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Oct 22 04:24:30 PDT 2008


---
 src/conn-presence.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/conn-presence.c b/src/conn-presence.c
index 967e71f..df3cc28 100644
--- a/src/conn-presence.c
+++ b/src/conn-presence.c
@@ -119,14 +119,13 @@ construct_contact_statuses_cb (GObject *obj,
 
       parameters = g_hash_table_new_full (g_str_hash, g_str_equal, NULL,
           (GDestroyNotify) tp_g_value_slice_free);
-      if (status_message != NULL) {
-        message = g_slice_new0 (GValue);
-        g_value_init (message, G_TYPE_STRING);
-        g_value_set_static_string (message, status_message);
 
-
-        g_hash_table_insert (parameters, "message", message);
-      }
+      if (status_message != NULL)
+        {
+          message = tp_g_value_slice_new (G_TYPE_STRING);
+          g_value_set_static_string (message, status_message);
+          g_hash_table_insert (parameters, "message", message);
+        }
 
       contact_status = tp_presence_status_new (status, parameters);
       g_hash_table_destroy (parameters);
-- 
1.5.6.5



More information about the Telepathy-commits mailing list