]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Remove preprocessor conditionals that are always true
authorAlejandro Colomar <alx@kernel.org>
Tue, 13 Dec 2022 21:12:51 +0000 (22:12 +0100)
committerSerge Hallyn <serge@hallyn.com>
Thu, 15 Dec 2022 22:22:05 +0000 (16:22 -0600)
In a previous commit, we made USE_TERMIOS unconditionally defined.
Let's just remove it, and remove the condition everywhere.

Reported-by: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Christian Göttsche <cgzones@googlemail.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/defines.h
src/sulogin.c

index 5e19c5d78873d2792fa7fdeb2433e7cc7cc78fe6..79970f076c50733c9b4c8f3712bd6e55f90a45a1 100644 (file)
@@ -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
index ecf18c79c3e9fb609273d3489b0ad0795124703e..ba4644d2fa8c95844828bbc0ed884bf4ac4028d0 100644 (file)
@@ -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);