[milter-manager-commit] milter-manager/milter-manager at 68b646a [master] Simplify

Back to archive index
Sutou Kouhei null+****@clear*****
Wed Sep 11 15:15:15 JST 2019


Sutou Kouhei	2019-09-11 15:15:15 +0900 (Wed, 11 Sep 2019)

  Revision: 68b646a778e6e507d4b168c35679bb602a718b81
  https://github.com/milter-manager/milter-manager/commit/68b646a778e6e507d4b168c35679bb602a718b81

  Message:
    Simplify

  Modified files:
    milter/core/milter-utils.c

  Modified: milter/core/milter-utils.c (+1 -6)
===================================================================
--- milter/core/milter-utils.c    2019-09-11 15:02:10 +0900 (014215ce)
+++ milter/core/milter-utils.c    2019-09-11 15:15:15 +0900 (0bb55ef1)
@@ -432,11 +432,6 @@ inspect_hash_string_string_element (gpointer _key, gpointer _value,
     g_string_append(inspected, ", ");
 }
 
-static gint compare_hash_key(gconstpointer a, gconstpointer b)
-{
-  return g_strcmp0((gchar *)a, (gchar *)b);
-}
-
 gchar *
 milter_utils_inspect_hash_string_string (GHashTable *hash)
 {
@@ -445,8 +440,8 @@ milter_utils_inspect_hash_string_string (GHashTable *hash)
     inspected = g_string_new("{");
     if (g_hash_table_size(hash) > 0) {
         GList *keys = g_hash_table_get_keys(hash);
-        keys = g_list_sort(keys, compare_hash_key);
         const GList *node;
+        keys = g_list_sort(keys, (GCompareFunc)g_strcmp0);
         for (node = keys; node; node = g_list_next(node)) {
             gpointer value = g_hash_table_lookup(hash, node->data);
             inspect_hash_string_string_element(node->data, value, inspected);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/milter-manager-commit/attachments/20190911/307066aa/attachment-0001.html>


More information about the milter-manager-commit mailing list
Back to archive index