aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir_function_detect_recursion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/ir_function_detect_recursion.cpp')
-rw-r--r--mesalib/src/glsl/ir_function_detect_recursion.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/mesalib/src/glsl/ir_function_detect_recursion.cpp b/mesalib/src/glsl/ir_function_detect_recursion.cpp
index 5813315b6..b2334d2e4 100644
--- a/mesalib/src/glsl/ir_function_detect_recursion.cpp
+++ b/mesalib/src/glsl/ir_function_detect_recursion.cpp
@@ -229,15 +229,13 @@ public:
static void
destroy_links(exec_list *list, function *f)
{
- foreach_list_safe(node, list) {
- struct call_node *n = (struct call_node *) node;
-
+ foreach_in_list_safe(call_node, node, list) {
/* If this is the right function, remove it. Note that the loop cannot
* terminate now. There can be multiple links to a function if it is
* either called multiple times or calls multiple times.
*/
- if (n->func == f)
- n->remove();
+ if (node->func == f)
+ node->remove();
}
}