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

Wyświetl plik

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