Work in progress

Implementing demand_list
This commit is contained in:
Michael Tryby
2019-04-15 13:35:37 -04:00
parent f80e74bc5c
commit c659c70817
5 changed files with 150 additions and 67 deletions

View File

@@ -162,7 +162,10 @@ void delete_node(list_t *list, list_node_t *lnode)
//
list_node_t *first_list(list_t *list)
{
return list->head;
if (list)
return list->head;
else
return NULL;
}
bool done_list(list_node_t *lnode)
@@ -171,6 +174,9 @@ bool done_list(list_node_t *lnode)
}
list_node_t *next_list(list_node_t *lnode)
{
return lnode->next;
{
if (lnode)
return lnode->next;
else
return NULL;
}