There is no advantage to for(;;)
over while(1)
.
Use while(1)
, because it's easier to comprehend (imho). I've never seen a for(;;)
used before, and it may be confusing to others who view your code, and may wonder the same thing you just asked.
EDIT: Here's a link: while (1) Vs. for (;;) Is there a speed difference?
It basically says that they both generate the same code. In assembly, it's jmp ...
.