aboutsummaryrefslogtreecommitdiff
path: root/framework/src/fwk_slist.c
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/fwk_slist.c')
-rw-r--r--framework/src/fwk_slist.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/framework/src/fwk_slist.c b/framework/src/fwk_slist.c
index 1787756e..99642304 100644
--- a/framework/src/fwk_slist.c
+++ b/framework/src/fwk_slist.c
@@ -89,9 +89,7 @@ struct fwk_slist_node *__fwk_slist_pop_head(struct fwk_slist *list)
list->head = popped->next;
-#ifdef BUILD_MODE_DEBUG
popped->next = NULL;
-#endif
return popped;
}
@@ -121,11 +119,12 @@ void __fwk_slist_remove(
while (node_iter->next != (struct fwk_slist_node *)list) {
if (node_iter->next == node) {
node_iter->next = node->next;
+
if (node->next == (struct fwk_slist_node *)list)
list->tail = (struct fwk_slist_node *)node_iter;
- #ifdef BUILD_MODE_DEBUG
+
node->next = NULL;
- #endif
+
return;
}
node_iter = node_iter->next;