tentative correction double.c insert
This commit is contained in:
@@ -28,7 +28,12 @@ int dlist_insert(struct dlist **l, size_t index, int e)
|
||||
//struct dlist *tmp = *l;
|
||||
|
||||
if(index == 0){
|
||||
dlist_append(*l, e);
|
||||
|
||||
new_node->prev = NULL;
|
||||
new_node->next = *l;
|
||||
new_node->data = e;
|
||||
|
||||
//dlist_append(*l, e);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user