From db338bfbb2ac34f36c381abd76d9c2ca0d432612 Mon Sep 17 00:00:00 2001 From: Matias Nitsche Date: Mon, 15 Jun 2020 15:20:29 -0300 Subject: [PATCH] pty: nxstyle fixes --- examples/pty_test/pty_test.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/examples/pty_test/pty_test.c b/examples/pty_test/pty_test.c index 8a285fda5..5d17e37e6 100644 --- a/examples/pty_test/pty_test.c +++ b/examples/pty_test/pty_test.c @@ -115,7 +115,7 @@ static void serial_in(struct term_pair_s *tp) /* Run forever */ - for (;;) + while (true) { #ifdef CONFIG_EXAMPLES_PTYTEST_POLL ret = poll((struct pollfd *)&fdp, 1, POLL_TIMEOUT); @@ -194,7 +194,7 @@ static void serial_out(struct term_pair_s *tp) /* Run forever */ - for (;;) + while (true) { #ifdef CONFIG_EXAMPLES_PTYTEST_POLL ret = poll((struct pollfd *)&fdp, 1, POLL_TIMEOUT); @@ -320,7 +320,8 @@ int main(int argc, FAR char *argv[]) if (errno == ENOTCONN) { - fprintf(stderr, "ERROR: device not connected, will continue trying\n"); + fprintf(stderr, "ERROR: device not connected, will continue" + " trying\n"); } while (termpair.fd_uart < 0 && errno == ENOTCONN) @@ -382,7 +383,8 @@ int main(int argc, FAR char *argv[]) /* Create a new console using this /dev/pts/N */ pid = task_create("NSH Console", CONFIG_EXAMPLES_PTYTEST_DAEMONPRIO, - CONFIG_EXAMPLES_PTYTEST_STACKSIZE, nsh_consolemain, NULL); + CONFIG_EXAMPLES_PTYTEST_STACKSIZE, nsh_consolemain, + NULL); if (pid < 0) { /* Can't do output because stdout and stderr are redirected */ @@ -416,7 +418,7 @@ int main(int argc, FAR char *argv[]) /* Stay here to keep the threads running */ - for (;;) + while (true) { /* Nothing to do, then sleep to avoid eating all cpu time */