Commit 875f4c85 authored by Austin Seipp's avatar Austin Seipp
Browse files

rts: delint/detab/dewhitespace TTY.c


Signed-off-by: default avatarAustin Seipp <austin@well-typed.com>
parent 3e0e489e
......@@ -27,7 +27,8 @@ static void *saved_termios[3] = {NULL,NULL,NULL};
void*
__hscore_get_saved_termios(int fd)
{
return (0 <= fd && fd < (int)(sizeof(saved_termios) / sizeof(*saved_termios))) ?
return (0 <= fd &&
fd < (int)(sizeof(saved_termios) / sizeof(*saved_termios))) ?
saved_termios[fd] : NULL;
}
......@@ -54,7 +55,8 @@ resetTerminalSettings (void)
sigaddset(&sigset, SIGTTOU);
sigprocmask(SIG_BLOCK, &sigset, &old_sigset);
for (fd = 0; fd <= 2; fd++) {
struct termios* ts = (struct termios*)__hscore_get_saved_termios(fd);
struct termios* ts =
(struct termios*)__hscore_get_saved_termios(fd);
if (ts != NULL) {
tcsetattr(fd,TCSANOW,ts);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment