Skip to content
Create a gist now

Instantly share code, notes, and snippets.

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

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
Something went wrong with that request. Please try again.