From 08e7168b1da8accb88a66ac6372d6bb16528ce2a Mon Sep 17 00:00:00 2001 From: Ry Date: Sat, 1 Apr 2023 19:09:36 -0700 Subject: [PATCH] Use spaces instead of tabs in serial.c --- src/serial.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/serial.c b/src/serial.c index 2d68d56..55ab87b 100644 --- a/src/serial.c +++ b/src/serial.c @@ -9,24 +9,24 @@ static struct termios saved_tios; static bool is_terminal = false; static void exit_handler(void) { - if (is_terminal) - tcsetattr(0, TCSANOW, &saved_tios); + if (is_terminal) + tcsetattr(0, TCSANOW, &saved_tios); } void serial_init(void) { - struct termios tios; + struct termios tios; - if (tcgetattr(0, &tios) != -1) { - is_terminal = 1; - saved_tios = tios; + if (tcgetattr(0, &tios) != -1) { + is_terminal = 1; + saved_tios = tios; atexit(exit_handler); - } + } - if (is_terminal) { - tios.c_lflag &= ~(ICANON|ECHO); - tcsetattr(0, TCSANOW, &tios); - } + if (is_terminal) { + tios.c_lflag &= ~(ICANON|ECHO); + tcsetattr(0, TCSANOW, &tios); + } } int serial_get(void) {