[PATCH 02/29] barriers: Don't loop over the server to destroy a barrier

Peter Hutterer peter.hutterer at who-t.net
Tue Dec 11 23:18:55 PST 2012


From: "Jasper St. Pierre" <jstpierre at mecheye.net>

This is completely pointless as far as I can tell.

Signed-off-by: Jasper St. Pierre <jstpierre at mecheye.net>
---
 Xi/xibarriers.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c
index ba9fd06..9e43196 100644
--- a/Xi/xibarriers.c
+++ b/Xi/xibarriers.c
@@ -437,22 +437,10 @@ CreatePointerBarrierClient(ClientPtr client,
 static int
 BarrierFreeBarrier(void *data, XID id)
 {
-    struct PointerBarrierClient *b = NULL, *barrier;
-    ScreenPtr screen;
-    BarrierScreenPtr cs;
+    struct PointerBarrierClient *barrier;
 
     barrier = container_of(data, struct PointerBarrierClient, barrier);
-
-    screen = barrier->screen;
-    cs = GetBarrierScreen(screen);
-
-    /* find and unlink from the screen private */
-    xorg_list_for_each_entry(b, &cs->barriers, entry) {
-        if (b == barrier) {
-            xorg_list_del(&b->entry);
-            break;
-        }
-    }
+    xorg_list_del(&barrier->entry);
 
     free(barrier);
     return Success;
-- 
1.8.0.1



More information about the xorg-devel mailing list