I'm analyzing a C program and i find this loop that i can't understand. There is no counter or limit or variable.
/* ioloop */
for (;;)
{
// statements
}
is this an infinite loop ?
I'm analyzing a C program and i find this loop that i can't understand. There is no counter or limit or variable.
/* ioloop */
for (;;)
{
// statements
}
is this an infinite loop ?
It's an idiomatic way of writing a potentially infinite loop in C.
Alternatives such as while(1)
often issued a compiler warning.
It is an infinite loop. Hopefully, there is a break
statement in the loop somewhere. A break
statement will cause the loop to exit.