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

When the software on the other side of the pty closes the device,
the simulator would close and reopen its side  but it is unneeded
because it can continue to call read() without doing anything special.
pull/1831/head
Daniele Forsi IU5HKX 2025-08-07 11:38:12 +02:00
rodzic 8887294cd8
commit 5b1517778e
12 zmienionych plików z 12 dodań i 36 usunięć

Wyświetl plik

@ -53,7 +53,6 @@ int main(int argc, char *argv[])
{
unsigned char buf[BUFSIZE], buf2[256];
again:
int fd = openPort(argv[1]);
while (1)
@ -63,8 +62,7 @@ again:
if (bytes == 0)
{
close(fd);
goto again;
continue;
}
if (bytes != 8)

Wyświetl plik

@ -21,7 +21,6 @@ int main(int argc, char *argv[])
{
unsigned char buf[BUFSIZE];
again:
int fd = openPort(argv[1]);
while (1)
@ -30,8 +29,7 @@ again:
if (bytes == 0)
{
close(fd);
goto again;
continue;
}
if (bytes != 5)

Wyświetl plik

@ -21,7 +21,6 @@ int main(int argc, char *argv[])
{
unsigned char buf[BUFSIZE];
again:
int fd = openPort(argv[1]);
while (1)
@ -30,8 +29,7 @@ again:
if (bytes == 0)
{
close(fd);
goto again;
continue;
}
if (bytes != 5)

Wyświetl plik

@ -23,7 +23,6 @@ int main(int argc, char *argv[])
{
unsigned char buf[BUFSIZE];
again:
int fd = openPort(argv[1]);
while (1)
@ -32,8 +31,7 @@ again:
if (bytes == 0)
{
close(fd);
goto again;
continue;
}
if (bytes != 5)

Wyświetl plik

@ -22,7 +22,6 @@ int main(int argc, char *argv[])
{
unsigned char buf[BUFSIZE];
again:
int fd = openPort(argv[1]);
while (1)
@ -31,8 +30,7 @@ again:
if (bytes == 0)
{
close(fd);
goto again;
continue;
}
if (bytes != 5)

Wyświetl plik

@ -24,7 +24,6 @@ int main(int argc, char *argv[])
unsigned char buf[BUFSIZE];
int freq, i, n;
again:
int fd = openPort(argv[1]);
while (1)
@ -33,8 +32,7 @@ again:
if (bytes == 0)
{
close(fd);
goto again;
continue;
}
if (bytes != 5)

Wyświetl plik

@ -25,7 +25,6 @@ int main(int argc, char *argv[])
unsigned char buf[BUFSIZE];
int n;
again:
int fd = openPort(argv[1]);
while (1)
@ -34,8 +33,7 @@ again:
if (bytes == 0)
{
close(fd);
goto again;
continue;
}
if (bytes != 5)

Wyświetl plik

@ -21,7 +21,6 @@ int main(int argc, char *argv[])
{
unsigned char buf[BUFSIZE];
again:
int fd = openPort(argv[1]);
while (1)
@ -30,8 +29,7 @@ again:
if (bytes == 0)
{
close(fd);
goto again;
continue;
}
if (bytes != 5)

Wyświetl plik

@ -50,7 +50,6 @@ int main(int argc, char *argv[])
{
unsigned char buf[BUFSIZE];
again:
int fd = openPort(argv[1]);
while (1)
@ -59,8 +58,7 @@ again:
if (bytes == 0)
{
close(fd);
goto again;
continue;
}
switch (buf[3])

Wyświetl plik

@ -40,7 +40,6 @@ int main(int argc, char *argv[])
{
char buf[BUFSIZE], reply[256];
again:
int fd = openPort(argv[1]);
while (1)
@ -49,8 +48,7 @@ again:
if (bytes == 0)
{
close(fd);
goto again;
continue;
}
if (strncmp(buf, "?V", 2) == 0)

Wyświetl plik

@ -56,7 +56,6 @@ int main(int argc, char *argv[])
{
unsigned char buf[BUFSIZE];
again:
int fd = openPort(argv[1]);
while (1)
@ -65,8 +64,7 @@ again:
if (bytes == 0)
{
close(fd);
goto again;
continue;
}
switch (buf[5])

Wyświetl plik

@ -21,7 +21,6 @@ int main(int argc, char *argv[])
{
unsigned char buf[BUFSIZE];
again:
int fd = openPort(argv[1]);
while (1)
@ -30,8 +29,7 @@ again:
if (bytes == 0)
{
close(fd);
goto again;
continue;
}
if (bytes != 5)