aboutsummaryrefslogtreecommitdiff
path: root/kernel.c
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2019-11-26 16:28:36 +0100
committerWojtek Kosior <kwojtus@protonmail.com>2019-11-26 16:28:36 +0100
commit3c1218507acb84c95818a044eefb51fc8e5fa4c7 (patch)
treeae2a2bc578ee0945aa93f33af6306c2082fe6ced /kernel.c
parent6eba61fede40efda3651bceb559f8d1fa372fa73 (diff)
downloadrpi-MMU-example-3c1218507acb84c95818a044eefb51fc8e5fa4c7.tar.gz
rpi-MMU-example-3c1218507acb84c95818a044eefb51fc8e5fa4c7.zip
don't use switch statement with fallthrough
Diffstat (limited to 'kernel.c')
-rw-r--r--kernel.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/kernel.c b/kernel.c
index f2e556c..f23ef78 100644
--- a/kernel.c
+++ b/kernel.c
@@ -35,13 +35,11 @@ void kernel_main(uint32_t r0, uint32_t r1, uint32_t atags)
while (1)
{
- char c;
- switch(c = uart_getc())
- {
- case '\r':
- uart_putc('\n');
- default:
- uart_putc(c);
- }
+ char c = uart_getc();
+
+ uart_putc(c);
+
+ if (c == '\r')
+ uart_putc('\n');
}
}