When writing the destroyQueue function for my queue ADT, is there really that much of a difference in using
Code:
while(queue->count)
as opposed to
Code:
while(queue->front != NULL)
for the control statement of the loop that steps through the queue and destroys it? Using the assumption that the rest of the code and functions are bug free, and that the queue counts and next pointers are working correctly to facilitate those conditions. I don't see a difference, but then, I'm just a student and may not be seeing some sort of subtle potential pitfall.