Browse Source

drivers/console: Reduce scope of 'pos' variable

The 'pos' variable is only used within a very limited scope inside the
uart_console_isr() function. Move it's declaration there to avoid
having it exposed to the entire c-file.

Change-Id: I45ff0090ea4e0aabe77db2549d0194e26ebb63ef
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
pull/255/head
Johan Hedberg 10 years ago committed by Anas Nashif
parent
commit
6eeec2137f
  1. 3
      drivers/console/uart_console.c

3
drivers/console/uart_console.c

@ -100,8 +100,6 @@ extern void __printk_hook_install(int (*fn)(int)); @@ -100,8 +100,6 @@ extern void __printk_hook_install(int (*fn)(int));
#endif
#if defined(CONFIG_CONSOLE_HANDLER)
static size_t pos;
static struct nano_fifo *avail_queue;
static struct nano_fifo *lines_queue;
@ -127,6 +125,7 @@ void uart_console_isr(void *unused) @@ -127,6 +125,7 @@ void uart_console_isr(void *unused)
while (uart_irq_update(uart_console_dev) &&
uart_irq_is_pending(uart_console_dev)) {
static struct uart_console_input *cmd;
static size_t pos;
uint8_t byte;
int rx;

Loading…
Cancel
Save