apache-mynewt-bot commented on issue #2233: [RFC] Fix console echo handling
URL: https://github.com/apache/mynewt-core/pull/2233#issuecomment-599564085
 
 
   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is 
[here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### 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

Reply via email to