projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4208044
)
Sort extensions properly
author
Matthias Clasen
<mclasen@redhat.com>
Fri, 3 Sep 2010 23:03:34 +0000
(19:03 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Fri, 3 Sep 2010 23:03:34 +0000
(19:03 -0400)
Just taking the difference of the priorities has overflow issues,
as pointed out in bug 623069.
gio/giomodule.c
patch
|
blob
|
history
diff --git
a/gio/giomodule.c
b/gio/giomodule.c
index 39a38ff5397e5cf07594d49276838c2d9733f04b..83f4cc788c88742af9d5d1e8aefc6c50b2c3e7fc 100644
(file)
--- a/
gio/giomodule.c
+++ b/
gio/giomodule.c
@@
-791,7
+791,13
@@
extension_prio_compare (gconstpointer a,
{
const GIOExtension *extension_a = a, *extension_b = b;
- return extension_b->priority - extension_a->priority;
+ if (extension_a->priority > extension_b->priority)
+ return -1;
+
+ if (extension_b->priority > extension_a->priority)
+ return 1;
+
+ return 0;
}
/**