Replace "goto again" with "continue" (second case)

Does the same thing with more structured control flow.
It also silences compiler warnings.
pull/1831/head
Daniele Forsi IU5HKX 2025-08-07 11:22:44 +02:00
rodzic 5b87b38704
commit 8887294cd8
2 zmienionych plików z 2 dodań i 8 usunięć

Wyświetl plik

@ -111,7 +111,6 @@ static void *rotorez_thread(void *arg)
int fd = *(int *)arg;
float az = 123;
float el = 45;
again:
while (1)
{
@ -120,10 +119,8 @@ again:
if (bytes == 0)
{
//close(fd);
hl_usleep(100 * 1000);
//printf("again\n");
goto again;
continue;
}
printf("line[%d]=%s\n", fd, buf);

Wyświetl plik

@ -111,7 +111,6 @@ static void *rotorez_thread(void *arg)
int fd = *(int *)arg;
float az = 123;
float el = 45;
again:
while (1)
{
@ -120,10 +119,8 @@ again:
if (bytes == 0)
{
//close(fd);
hl_usleep(100 * 1000);
//printf("again\n");
goto again;
continue;
}
printf("line[%d]=%s\n", fd, buf);