From: Alejandro Colomar Date: Tue, 13 Dec 2022 21:12:51 +0000 (+0100) Subject: Remove preprocessor conditionals that are always true X-Git-Tag: 4.14.0-rc1~261 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54847a76da53799b8f22a7849aa8758af8ef8769;p=thirdparty%2Fshadow.git Remove preprocessor conditionals that are always true 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 --- diff --git a/lib/defines.h b/lib/defines.h index 5e19c5d78..79970f076 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 ecf18c79c..ba4644d2f 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);