Better fix for 3.12.0-35, thanks to Michael Rasmussen.
authorwwp <wwp@free.fr>
Thu, 30 Jul 2015 22:17:10 +0000 (00:17 +0200)
committerwwp <wwp@free.fr>
Thu, 30 Jul 2015 22:17:10 +0000 (00:17 +0200)
src/addr_compl.c

index b3398f6..975db50 100644 (file)
@@ -230,15 +230,7 @@ static gint addr_comparison_func(gconstpointer a, gconstpointer b)
        else if (a_weight > b_weight)
                return 1;
        else {
-           cmp = strcmp(a_ref->name, b_ref->name);
-               if (cmp)
-                   return cmp;
-               else {
-                       if (a_ref->address && b_ref->address)
-                               return strcmp(a_ref->address, b_ref->address);
-                       else
-                               return -1;
-               }
+               return cmp ? cmp : g_strcmp0(a_ref->address, b_ref->address);
        }
 }