Fixed insert
This commit is contained in:
parent
d21916ff6e
commit
0f2f47ea79
8
llist.h
8
llist.h
@ -26,14 +26,14 @@ llist Llist(char *name, node *head){
|
||||
return nllist;
|
||||
}
|
||||
|
||||
void append(llist l, node *n){
|
||||
if(l.head != NULL){
|
||||
node *temp = l.head;
|
||||
void append(llist *l, node *n){
|
||||
if(l->head != NULL){
|
||||
node *temp = l->head;
|
||||
while(temp->next != NULL)
|
||||
temp = temp-> next;
|
||||
temp->next = n;
|
||||
}else{
|
||||
l.head = n;
|
||||
l->head = n;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user