Create a gist now

Instantly share code, notes, and snippets.

@eric-wieser /deleteNode.c Secret
Last active Dec 12, 2015

What would you like to do?
void deleteNode(tList *list, tListNode *obsoleteNode)
tListNode **nodePtr;
for(nodePtr = &list->head; *nodePtr != NULL; nodePtr = &(*nodePtr)->next)
list->tail = *nodePtr;
if(*nodePtr == obsoleteNode)
*nodePtr = &(*nodePtr)->next;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment