apache-mynewt-bot commented on issue #2233: Fix console echo handling URL: https://github.com/apache/mynewt-core/pull/2233#issuecomment-596547070 <!-- style-bot --> ## Style check summary ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md) #### sys/console/full/src/console.c <details> ```diff @@ -1022,7 +1022,7 @@ nlip_state = NLIP_PKT_START1; } else { handled = g_console_ignore_non_nlip && - !MYNEWT_VAL(CONSOLE_NLIP_ECHO_LF) && byte != '\r' && byte != '\n'; + !MYNEWT_VAL(CONSOLE_NLIP_ECHO_LF) && byte != '\r' && byte != '\n'; } break; } ``` </details> #### sys/console/minimal/src/console.c <details> ```diff @@ -293,12 +292,13 @@ if (!ev) { ev = os_eventq_get_no_wait(avail_queue); - if (!ev) + if (!ev) { return 0; + } input = ev->ev_arg; } - if (MYNEWT_VAL(CONSOLE_NLIP) && handle_nlip(byte)) { + if (MYNEWT_VAL(CONSOLE_NLIP) && handle_nlip(byte)) { if (byte == '\n') { insert_char(&input->line[cur], byte, end); input->line[cur] = '\0'; @@ -337,7 +337,7 @@ if (!isprint(byte)) { switch (byte) { #if MYNEWT_VAL(CONSOLE_NLIP) - case CONSOLE_NLIP_PKT_START1: + case CONSOLE_NLIP_PKT_START1: nlip_state |= NLIP_PKT_START1; break; case CONSOLE_NLIP_DATA_START1: @@ -346,9 +346,9 @@ #endif default: insert_char(&input->line[cur], byte, end); - /* Falls through. */ + /* Falls through. */ case '\r': - /* Falls through. */ + /* Falls through. */ case '\n': if (byte == '\n' && prev_endl == '\r') { /* handle double end line chars */ ``` </details>
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
