while() is checked before entering the loop, what Esper describes is do{} while();
Proof:
// Never prints anything
void foo()
{
while(0)
{
printf("Hello World");
}
}
// Prints out "Hello World" exactly once
void bar()
{
void *bar = (void *)0x1000;
while(bar)
{
printf("Hello World");
bar = NULL;
wait(1);
}
}
Also, PadMalcoms version is correct but depends on early abortion of conditions which isn't supported in Lite-C, so the correct way would be splitting up the condition into two different conditions.