added some useless NULL check
This commit is contained in:
parent
4a1d77175e
commit
7d79ee29eb
@ -90,6 +90,8 @@ void remove_node(node_t *node)
|
|||||||
|
|
||||||
node_t *get_node(void *pointer)
|
node_t *get_node(void *pointer)
|
||||||
{
|
{
|
||||||
|
if (head == NULL) return NULL; //EMPTY LIST
|
||||||
|
|
||||||
node_t *buffer = head;
|
node_t *buffer = head;
|
||||||
while (buffer -> next != NULL)
|
while (buffer -> next != NULL)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user