[empathy: 5/9] Use empathy_uint_compare



commit f0d5544426b06662365a3b99e05eae23e76b6ee6
Author: Cosimo Cecchi <cosimo cecchi collabora co uk>
Date:   Tue Jun 2 11:09:28 2009 +0200

    Use empathy_uint_compare

 libempathy/empathy-tp-file.c |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)
---
diff --git a/libempathy/empathy-tp-file.c b/libempathy/empathy-tp-file.c
index 9ae4282..a056699 100644
--- a/libempathy/empathy-tp-file.c
+++ b/libempathy/empathy-tp-file.c
@@ -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) ==



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