I didn't touch C for a while and now I am surprised that this while-loop is more mystic than I ever realized.
I tried while ((byte_sent < sizeof(int)))
and while (byte_sent < sizeof(int))
, the same result I got. The code inside the loop is never reached.
Tested with Gcc, Clion build chain, online compiler.
#include <stdio.h>
int main()
{
int byte_sent = -1;
while ((byte_sent < sizeof(int))) {
printf("We are in\n");
break; // Just want to know if the inner loop gets executed
}
return 0;
}