From 505b89778d8aaa7018bace54f152d62b2994e04d Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 19 Jun 2018 08:28:23 +0200 Subject: 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 --- common/console.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'common/console.c') 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++; -- cgit v1.2.3