From 54847a76da53799b8f22a7849aa8758af8ef8769 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Tue, 13 Dec 2022 22:12:51 +0100 Subject: [PATCH] Remove preprocessor conditionals that are always true MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In a previous commit, we made USE_TERMIOS unconditionally defined. Let's just remove it, and remove the condition everywhere. Reported-by: Iker Pedrosa Cc: Christian Göttsche Cc: Mike Frysinger Signed-off-by: Alejandro Colomar --- lib/defines.h | 1 - src/sulogin.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/lib/defines.h b/lib/defines.h index 5e19c5d7..79970f07 100644 --- a/lib/defines.h +++ b/lib/defines.h @@ -158,7 +158,6 @@ static inline void memzero(void *ptr, size_t size) #define STTY(fd, termio) tcsetattr(fd, TCSANOW, termio) #define GTTY(fd, termio) tcgetattr(fd, termio) #define TERMIO struct termios -#define USE_TERMIOS /* * Password aging constants diff --git a/src/sulogin.c b/src/sulogin.c index ecf18c79..ba4644d2 100644 --- a/src/sulogin.c +++ b/src/sulogin.c @@ -67,13 +67,11 @@ static void catch_signals (unused int sig) TERMIO termio; int err = 0; -#ifdef USE_TERMIOS tcgetattr (0, &termio); termio.c_iflag |= (ICRNL | IXON); termio.c_oflag |= (CREAD); termio.c_lflag |= (ECHO | ECHOE | ECHOK | ICANON | ISIG); tcsetattr (0, TCSANOW, &termio); -#endif Prog = Basename (argv[0]); log_set_progname(Prog);