added empty list check to remove_node_from_end
This commit is contained in:
parent
0a61d0ad57
commit
951d112a4f
@ -66,6 +66,8 @@ void push_to_list_end(char *identifier)
|
|||||||
|
|
||||||
void remove_node_from_end(void)
|
void remove_node_from_end(void)
|
||||||
{
|
{
|
||||||
|
if (list_head == NULL) return; //EMPTY LIST
|
||||||
|
|
||||||
node_t *buffer = list_head;
|
node_t *buffer = list_head;
|
||||||
|
|
||||||
if (buffer -> next == NULL) //ONLY ONE NODE
|
if (buffer -> next == NULL) //ONLY ONE NODE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user