Quote Originally Posted by cma
And you should do
Code:
return (*lptr != NULL);
since the way you have it, it will always return true.
I understand, but it does return false sometimes when written as "lptr != NULL". I have filled a linked list with ascending integers from 1 to 25, then wrote a loop starting at 1 and incrementing by two every pass (essentially, odd numbers) and removed the incrementer value from the list every pass.

Either way I write it, I still end up with a linked list filled only with even numbers, just as expected... why? Could it be the system I run it on (FreeBSD UNIX/Mac OS X)?

Strage... it runs fine on my Mac OS X box, it runs fine on a Solaris box... but on a Fedora Core 2 box, it throws a segmentation fault and dumps the core.