summaryrefslogtreecommitdiffstats
path: root/common/console.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-06-19 08:28:23 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-06-19 08:29:43 +0200
commit505b89778d8aaa7018bace54f152d62b2994e04d (patch)
treed2d0d46b5108bf4da38dc6e4410b90e41cf7b7f3 /common/console.c
parent6690317217e02302826a48eb56d07524837cd49f (diff)
downloadbarebox-505b89778d8aaa7018bace54f152d62b2994e04d.tar.gz
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>
Diffstat (limited to 'common/console.c')
-rw-r--r--common/console.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/common/console.c b/common/console.c
index c40eba6..cd37d88 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++;