Skip to content

Commit 3b7292a

Browse files
committed
Update singlyLinkedList.c
1 parent 82a74fc commit 3b7292a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

linked_list/singlyLinkedList.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,11 @@ int deleteFront(list *a)
8888
return -1;
8989
}
9090

91-
node temp = a->head;
92-
int temp2 = temp->d;
91+
node cur = a->head;
92+
int temp = cur->d;
93+
9394
a->head = a->head->next;
9495

95-
free(temp);
96-
return temp2;
96+
free(cur);
97+
return temp;
9798
}

0 commit comments

Comments
 (0)