kopia lustrzana https://github.com/Hamlib/Hamlib
Replace "goto again" with "continue" (second case)
Does the same thing with more structured control flow. It also silences compiler warnings.pull/1831/head
rodzic
5b87b38704
commit
8887294cd8
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Ładowanie…
Reference in New Issue