aboutsummaryrefslogtreecommitdiff
path: root/llist.h
diff options
context:
space:
mode:
authorSoikk2022-01-30 02:54:23 +0100
committerSoikk2022-01-30 02:54:23 +0100
commit0f2f47ea7938521b201bde3454c0946240e687ef (patch)
tree5df7c92dccb3e90be997d703c7954f64171f1a65 /llist.h
parentd21916ff6e651e1dd2f6cffbbca55076967e95bc (diff)
downloadsoikk-llist.h-0f2f47ea7938521b201bde3454c0946240e687ef.tar.xz
soikk-llist.h-0f2f47ea7938521b201bde3454c0946240e687ef.tar.zst
Fixed insert
Diffstat (limited to 'llist.h')
-rw-r--r--llist.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/llist.h b/llist.h
index 340ab0f..cdef2cd 100644
--- a/llist.h
+++ b/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;
}
}