Commit 5fbabcef authored by William Sha's avatar William Sha
Browse files

Minor fix for initialize in insert

parent 482aad3f
......@@ -75,7 +75,8 @@ void insert_beginning_list(List** list, char* str){
return;
}
List *tempList = malloc(sizeof(List));
List *tempList;
initialize(&tempList);
insert_empty_list(&tempList, str);
tempList->tail->next = (*list)->head;
(*list)->head = tempList->head;
......@@ -91,7 +92,8 @@ void insert_end_list(List** list, char* str){
return;
}
List *tempList = malloc(sizeof(List));
List *tempList;
initialize(&tempList);
insert_empty_list(&tempList, str);
(*list)->tail->next = tempList->head;
(*list)->tail = tempList->tail;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment