Skip to content
Snippets Groups Projects
Commit ddebdbb1 authored by Jakob Olsson's avatar Jakob Olsson
Browse files

correction to dequeue

parent 555ba37c
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,10 @@ struct node *stack_dequeue(struct list_head *stack) ...@@ -26,7 +26,10 @@ struct node *stack_dequeue(struct list_head *stack)
{ {
struct node *n; struct node *n;
return list_first_entry(stack, struct node, list); n = list_first_entry(stack, struct node, list);
list_del(n->list);
return n;
} }
void add_visited(struct node *n, struct list_head *visited) void add_visited(struct node *n, struct list_head *visited)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment