You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/06/15 20:22:29 UTC
[incubator-nuttx-apps] 03/03: pty: nxstyle fixes
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit db338bfbb2ac34f36c381abd76d9c2ca0d432612
Author: Matias Nitsche <mn...@dc.uba.ar>
AuthorDate: Mon Jun 15 15:20:29 2020 -0300
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 8a285fd..5d17e37 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 */