Re: lists issue

2018-07-27 Thread Maria Jan Matějka
Hello! See the init_list() function and the list structure. All lists in lib/lists.[hc] have heads. Therefore if n->prev is NULL, you don't have a valid node but a list head, the same for list tail and n->next. All valid nodes have valid both prev and next pointers. Maria On July 27, 2018 8

lists issue

2018-07-26 Thread Arvin Gan
Hi all, There may be an issue in blow function when deleted the node is the first one, that mean n->prev is NULL., similarly, same issue as the last one node is deleted. LIST_INLINE void rem_node(node *n) { node *z = n->prev; node *x = n->next; z->next = x; x->prev = z; n->