From 2868a93945f043e1efd897d56543fe673e341faf Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sun, 9 Dec 2012 18:41:52 -0500 Subject: barriers: Don't loop over the server to destroy a barrier This is completely pointless as far as I can tell. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer --- Xi/xibarriers.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'Xi') diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c index ba9fd063e..9e43196f6 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; -- cgit v1.2.3