Fix Coverity issues
authorColin Leroy <colin@colino.net>
Thu, 5 Jun 2014 14:55:26 +0000 (16:55 +0200)
committerColin Leroy <colin@colino.net>
Thu, 5 Jun 2014 14:55:26 +0000 (16:55 +0200)
src/addrcustomattr.c

index f3b067ff532a0b8b3a1b25acc4e643a4f3f7b098..46f769d0a1a0308b2e11e58456913c09545ca892 100644 (file)
@@ -111,7 +111,7 @@ static gint custom_attr_cmp_func (GtkTreeModel *model, GtkTreeIter *a,
                return name2 == NULL ? 0:1;
        
        if (name2 == NULL)
-               return name1 == NULL ? 0:1;
+               return 1;
        
        return g_utf8_collate(name1, name2);
 }
@@ -597,7 +597,6 @@ static void custom_attr_window_save_list (void)
        g_list_free(prefs_common.addressbook_custom_attributes);
 
        /* copy attribute names list from store to prefs */
-       store_to_glist = store_to_glist;
        gtk_tree_model_foreach(gtk_tree_view_get_model
                        (GTK_TREE_VIEW(custom_attr_window.attr_list)), 
                        (GtkTreeModelForeachFunc) custom_attr_store_to_glist,