From bf6548ca3093f218bed6a6f058771e50c2dcf35f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Kijewski?= Date: Mon, 11 Aug 2014 18:42:25 +0200 Subject: [PATCH] core: shadowing in priority_queue_print The variable `node` shadows the parameter `node`. The access of `node->first` would not compile, because there is no member `first` in `priority_queue_t`. --- core/priority_queue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/priority_queue.c b/core/priority_queue.c index 6e1f2a1299..95fe71f963 100644 --- a/core/priority_queue.c +++ b/core/priority_queue.c @@ -69,11 +69,11 @@ void priority_queue_add(priority_queue_t *root, priority_queue_node_t *new_obj) } #if ENABLE_DEBUG -void priority_queue_print(priority_queue_t *node) +void priority_queue_print(priority_queue_t *root) { printf("queue:\n"); - for (priority_queue_node_t *node = node->first; node; node = node->next) { + for (priority_queue_node_t *node = root->first; node; node = node->next) { printf("Data: %u Priority: %lu\n", node->data, (unsigned long) node->priority); } }