aboutsummaryrefslogtreecommitdiff
path: root/src/linked_list.c
diff options
context:
space:
mode:
authorMikkel Thestrup <mithe24@student.sdu.dk>2025-12-11 14:45:28 +0100
committerMikkel Thestrup <mithe24@student.sdu.dk>2025-12-11 14:45:28 +0100
commit8cc886570da5c8ea0923741bdd2494eb34fb6989 (patch)
tree9efe2f4241ef972cea9fb3e99832097bc5f95558 /src/linked_list.c
parent5042c3b3fab94d32a3485a736378058e9b4c7e28 (diff)
downloadcycle-detector-8cc886570da5c8ea0923741bdd2494eb34fb6989.tar.gz
cycle-detector-8cc886570da5c8ea0923741bdd2494eb34fb6989.zip
Don't need to set prev
Diffstat (limited to 'src/linked_list.c')
-rw-r--r--src/linked_list.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/linked_list.c b/src/linked_list.c
index 12cfd9b..eb8d3c5 100644
--- a/src/linked_list.c
+++ b/src/linked_list.c
@@ -34,11 +34,9 @@ LinkedListNode *linked_list_append(LinkedList *ll, void *elem) {
};
if (!ll->head) {
- new_node->prev = NULL;
ll->head = new_node;
ll->tail = new_node;
} else {
- new_node->prev = ll->tail;
ll->tail->next = new_node;
ll->tail = new_node;
}