diff options
author | Danny Holman <dholman@gymli.org> | 2023-11-26 18:38:12 -0600 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2023-11-26 18:38:12 -0600 |
commit | 97ad22109065680dc1d4506682d60bb2ed1bf4b3 (patch) | |
tree | 170817cc75154a2f2d2a06b28cb2cf086f9a8263 | |
parent | 34ab1bd020ad5567955654ae5f0f8f0a10e62b1e (diff) |
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 <dholman@gymli.org>
-rw-r--r-- | arch/i386/kernel/tty.c | 7 |
1 files 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) { |