diff options
author | Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> | 2017-01-24 09:06:08 +0100 |
---|---|---|
committer | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2017-01-27 12:35:53 +0200 |
commit | fb9810978fb77ac1111098e7078eaa2de630b58d (patch) | |
tree | 3201e0b8e3eea00be5c2e75670f719953d664c62 | |
parent | 1a52e6e91af66777888b9ec717b2eabdff9972f7 (diff) |
drivers/uart_console: Fix tiny style issues
Basically missing {} on if statements.
Taking the opportunity to remove a useless switch.
Change-Id: Ic6b3951dfc257cb46d858ebcd12bdf1b4e7ff997
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
-rw-r--r-- | drivers/console/uart_console.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/console/uart_console.c b/drivers/console/uart_console.c index 40bb42551..958e48bf7 100644 --- a/drivers/console/uart_console.c +++ b/drivers/console/uart_console.c @@ -70,10 +70,11 @@ static int console_in(void) { unsigned char c; - if (uart_poll_in(uart_console_dev, &c) < 0) + if (uart_poll_in(uart_console_dev, &c) < 0) { return EOF; - else + } else { return (int)c; + } } #endif @@ -366,8 +367,9 @@ void uart_console_isr(struct device *unused) if (!cmd) { cmd = k_fifo_get(avail_queue, K_NO_WAIT); - if (!cmd) + if (!cmd) { return; + } } /* Handle ANSI escape mode */ @@ -378,13 +380,9 @@ void uart_console_isr(struct device *unused) /* Handle escape mode */ if (atomic_test_and_clear_bit(&esc_state, ESC_ESC)) { - switch (byte) { - case ANSI_ESC: + if (byte == ANSI_ESC) { atomic_set_bit(&esc_state, ESC_ANSI); atomic_set_bit(&esc_state, ESC_ANSI_FIRST); - break; - default: - break; } continue; |