From 97ad22109065680dc1d4506682d60bb2ed1bf4b3 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Sun, 26 Nov 2023 18:38:12 -0600 Subject: arch: i386: tty.c: remove unneeded local variable Remove an unused local variable from tty_putchar. Instead, just cast the signed char to unsigned as needed. Signed-off-by: Danny Holman --- arch/i386/kernel/tty.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/i386/kernel/tty.c b/arch/i386/kernel/tty.c index 1e2e6b5..d2bba53 100644 --- a/arch/i386/kernel/tty.c +++ b/arch/i386/kernel/tty.c @@ -43,10 +43,11 @@ void terminal_scroll(void) { } void tty_putchar(char c) { - unsigned char uc; - - uc = c; + unsigned char uc = c; switch (uc) { + case '\r': + terminal_column = 0; + break; case '\n': terminal_column = 0; if (++terminal_row == VGA_HEIGHT) { -- cgit v1.2.3