From 2abc2b27d76397df0db1f56b04c1f5e8bd5b0f7e Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Fri, 16 Nov 2007 16:07:17 -0800 Subject: [PATCH] From Jeremy: In my previous patch, I "overfixed" hook.c. This patch removes the changes I made to the searching for loop since those are extraneous due to the remove function call in the delete for loop. --- hw/darwin/quartz/xpr/x-hook.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/hw/darwin/quartz/xpr/x-hook.c b/hw/darwin/quartz/xpr/x-hook.c index 2d9a564d6..84bf44416 100644 --- a/hw/darwin/quartz/xpr/x-hook.c +++ b/hw/darwin/quartz/xpr/x-hook.c @@ -50,19 +50,12 @@ X_PFX (hook_remove) (x_list *lst, x_hook_function *fun, void *data) { x_list *node, *cell; x_list *to_delete = NULL; - x_list *prev = NULL; - for (node = lst; node != NULL; prev = node, node = node->next) + for (node = lst; node != NULL; node = node->next) { cell = node->data; if (CELL_FUN (cell) == fun && CELL_DATA (cell) == data) - { to_delete = X_PFX (list_prepend) (to_delete, cell); - if(lst == node) - lst = node->next; - else - prev->next = node->next; - } } for (node = to_delete; node != NULL; node = node->next)