]> git.0d.be Git - empathy.git/commitdiff
Use empathy_uint_compare
authorCosimo Cecchi <cosimo.cecchi@collabora.co.uk>
Tue, 2 Jun 2009 09:09:28 +0000 (11:09 +0200)
committerCosimo Cecchi <cosimo.cecchi@collabora.co.uk>
Sun, 7 Jun 2009 13:20:09 +0000 (15:20 +0200)
libempathy/empathy-tp-file.c

index 9ae42828bc803d961a3125850353ae05a3a7bf36..a056699f8a11e6be72027d8bace91beea39c7ee3 100644 (file)
@@ -128,18 +128,6 @@ tp_file_get_state_cb (TpProxy *proxy,
   priv->state = g_value_get_uint (value);
 }
 
-static gint
-uint_compare (gconstpointer a, gconstpointer b)
-{
-  const guint *uinta = a;
-  const guint *uintb = b;
-
-  if (*uinta == *uintb)
-    return 0;
-
-  return (*uinta > *uintb) ? 1 : -1;
-}
-
 static void
 tp_file_get_available_socket_types_cb (TpProxy *proxy,
     const GValue *value,
@@ -175,7 +163,7 @@ tp_file_get_available_socket_types_cb (TpProxy *proxy,
       GUINT_TO_POINTER (TP_SOCKET_ADDRESS_TYPE_IPV4))) != NULL)
     {
       priv->socket_address_type = TP_SOCKET_ADDRESS_TYPE_IPV4;
-      g_array_sort (access_controls, uint_compare);
+      g_array_sort (access_controls, empathy_uint_compare);
 
       /* here port is preferred over localhost */
       if ((g_array_index (access_controls, guint, 0) ==