Op 20-11-12 08:23, Keith Packard schreef:
> Peter Hutterer <[email protected]> writes:
>
>> As aaron said in the original thread, using the nt_list macros can leave the
>> current list in-place but avoids open-coding it again. this would be the
>> easiest quick-term fix, but still needs someone to do and test it...
> Yeah, if someone wants to try the nt_list version and make sure that
> works, I'd take that into master so we could at least have the bug fixed
> for 1.13.1
>
>> IMO a switch to a struct list shouldn't go into the stable branch anyway (at
>> least not that quickly)
> I haven't checked, but wouldn't switching to xorg_list cause ABI problems?
>
Probably not.

Anyhow the nt patch here.

diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 41ffabd..6082bee 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -270,10 +270,10 @@ xf86Wakeup(pointer blockData, int err, pointer pReadmask)
        }
     }
 
-    if (err >= 0) { /* we don't want the handlers called if select() */
-       IHPtr ih;   /* returned with an error condition, do we?      */
-       
-       for (ih = InputHandlers; ih; ih = ih->next) {
+    if (err >= 0) {       /* we don't want the handlers called if select() */
+        IHPtr ih, ih_tmp; /* returned with an error condition, do we?      */
+
+        nt_list_for_each_entry_safe(ih, ih_tmp, InputHandlers, next) {
            if (ih->enabled && ih->fd >= 0 && ih->ihproc &&
                (FD_ISSET(ih->fd, ((fd_set *)pReadmask)) != 0)) {
                ih->ihproc(ih->fd, ih->data);

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to