Greetings.
Seems like a dumb question, but it's not what you would think.
I am trying to remove items from a linked list. Normally, this is not a
problem for me.
for (k=list; k!=NULL; k=k_next) {
k_next = k->next;
/* code code code */
}
Is fine for removing one entry. However, I have a function that might cause
several items in the list to be removed, including what k_next is pointing
at. This makes k_next start looping through the k_free linked list.
Definitely not what I want.
Any suggestions?
Jason