[gnome-software] GsPluginLoader: fix sorting the priorities



commit 067af38f4720c650d05a67aa328863f5fdbe81b9
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Sun Sep 1 19:39:21 2013 +0200

    GsPluginLoader: fix sorting the priorities
    
    Need a C style sort function (-1, 0, 1), not C++ (<)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707185

 src/gs-plugin-loader.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 1242e24..453d6c4 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -1747,7 +1747,7 @@ gs_plugin_loader_plugin_sort_fn (gconstpointer a, gconstpointer b)
 {
        GsPlugin **pa = (GsPlugin **) a;
        GsPlugin **pb = (GsPlugin **) b;
-       return (*pa)->priority < (*pb)->priority;
+       return (*pa)->priority - (*pb)->priority;
 }
 
 /**


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