On the fourth time through the loop, the current element is 'd', so the
comparison pointer is set to 'd'.
The fifth time through the loop, the current element is 'c'.
'c'!='d', so go on
the sixth iteration gives 'd'
'd'=='d'---loop detected.
I may be wrong. Anyway, this is somewhat beside the point, as I'm sure
that Linus et al don't need anyone to tell them an algorithm to find a
loop in a linked list... ;^>
Sean Hunter
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu