From 8887294cd85a1c53bd6fef428b735b7eaee6c6ae Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Thu, 7 Aug 2025 11:22:44 +0200 Subject: [PATCH] Replace "goto again" with "continue" (second case) Does the same thing with more structured control flow. It also silences compiler warnings. --- simulators/simeasycomm.c | 5 +---- simulators/simrotorez.c | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/simulators/simeasycomm.c b/simulators/simeasycomm.c index a774e5fcc..da5647650 100644 --- a/simulators/simeasycomm.c +++ b/simulators/simeasycomm.c @@ -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); diff --git a/simulators/simrotorez.c b/simulators/simrotorez.c index 48b0042ba..7b4ba21d5 100644 --- a/simulators/simrotorez.c +++ b/simulators/simrotorez.c @@ -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);