diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-06-19 08:28:23 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-06-19 08:29:43 +0200 |
commit | 505b89778d8aaa7018bace54f152d62b2994e04d (patch) | |
tree | d2d0d46b5108bf4da38dc6e4410b90e41cf7b7f3 | |
parent | 6690317217e02302826a48eb56d07524837cd49f (diff) | |
download | barebox-505b89778d8aaa7018bace54f152d62b2994e04d.tar.gz barebox-505b89778d8aaa7018bace54f152d62b2994e04d.tar.xz |
console: remove duplicate newline conversion
When the console is not yet fully initialized then console_puts falls
back to print characters using console_putc. console_putc already
does newline conversion, so do not repeat it in console_puts.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | common/console.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/console.c b/common/console.c index c40eba6d55..cd37d88cc4 100644 --- a/common/console.c +++ b/common/console.c @@ -552,10 +552,9 @@ int console_puts(unsigned int ch, const char *str) } while (*s) { - if (*s == '\n') { - console_putc(ch, '\r'); + if (*s == '\n') n++; - } + console_putc(ch, *s); n++; s++; |