From b5b904cfc9bf22ce9f6c3cfcf110e4559ef0994a Mon Sep 17 00:00:00 2001 From: trimill Date: Wed, 31 Jan 2024 22:30:35 -0500 Subject: follow the corn style guide --- src/arch/amd64/serial.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/arch/amd64/serial.c') diff --git a/src/arch/amd64/serial.c b/src/arch/amd64/serial.c index d63d9dd..fe21629 100644 --- a/src/arch/amd64/serial.c +++ b/src/arch/amd64/serial.c @@ -18,7 +18,7 @@ int serial_init(void) { outb(PORT + 0, 0xAE); // test by sending 0xAE uint8_t response = inb(PORT + 0); - if(response != 0xAE) { + if (response != 0xAE) { // TODO panic here? return -1; } @@ -30,18 +30,18 @@ int serial_init(void) { uint8_t serial_in(void) { // wait for data to be available - while((inb(PORT + 5) & 0x01) == 0); + while ((inb(PORT + 5) & 0x01) == 0); return inb(PORT); } void serial_out(uint8_t ch) { // wait for output to be free - while((inb(PORT + 5) & 0x20) == 0); + while ((inb(PORT + 5) & 0x20) == 0); outb(PORT, ch); } void serial_out_str(const char *str) { - for(; *str != '\0'; str++) { + for (; *str != '\0'; str++) { serial_out(*str); } } -- cgit v1.2.3-freya