gmain: fix poll record comparison
authorRyan Lortie <desrt@desrt.ca>
Fri, 28 Nov 2014 17:43:03 +0000 (12:43 -0500)
committerRyan Lortie <desrt@desrt.ca>
Sat, 29 Nov 2014 04:54:02 +0000 (23:54 -0500)
We intend to keep the list of poll records sorted by (integer) file
descriptor, but due to a typo we are actually keeping it sorted by
pointer address of the GPollFD.

Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=11059

glib/gmain.c

index e2b6ca3b1ab6ae51505cb46d44d83ad4997eead0..e20128a47d8cff1b32bc8c36bec51e3ef4a10c8d 100644 (file)
@@ -4205,7 +4205,7 @@ g_main_context_add_poll_unlocked (GMainContext *context,
   nextrec = context->poll_records;
   while (nextrec)
     {
-      if (nextrec->fd > fd)
+      if (nextrec->fd->fd > fd->fd)
         break;
       prevrec = nextrec;
       nextrec = nextrec->next;