summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2023-11-26 18:38:12 -0600
committerDanny Holman <dholman@gymli.org>2023-11-26 18:38:12 -0600
commit97ad22109065680dc1d4506682d60bb2ed1bf4b3 (patch)
tree170817cc75154a2f2d2a06b28cb2cf086f9a8263 /arch
parent34ab1bd020ad5567955654ae5f0f8f0a10e62b1e (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>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/tty.c7
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) {