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 <ipedrosa@redhat.com> Cc: Christian Göttsche <cgzones@googlemail.com> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
committed by
Serge Hallyn
parent
f2ae6a42a4
commit
54847a76da
@@ -158,7 +158,6 @@ static inline void memzero(void *ptr, size_t size)
|
|||||||
#define STTY(fd, termio) tcsetattr(fd, TCSANOW, termio)
|
#define STTY(fd, termio) tcsetattr(fd, TCSANOW, termio)
|
||||||
#define GTTY(fd, termio) tcgetattr(fd, termio)
|
#define GTTY(fd, termio) tcgetattr(fd, termio)
|
||||||
#define TERMIO struct termios
|
#define TERMIO struct termios
|
||||||
#define USE_TERMIOS
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Password aging constants
|
* Password aging constants
|
||||||
|
@@ -67,13 +67,11 @@ static void catch_signals (unused int sig)
|
|||||||
TERMIO termio;
|
TERMIO termio;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
#ifdef USE_TERMIOS
|
|
||||||
tcgetattr (0, &termio);
|
tcgetattr (0, &termio);
|
||||||
termio.c_iflag |= (ICRNL | IXON);
|
termio.c_iflag |= (ICRNL | IXON);
|
||||||
termio.c_oflag |= (CREAD);
|
termio.c_oflag |= (CREAD);
|
||||||
termio.c_lflag |= (ECHO | ECHOE | ECHOK | ICANON | ISIG);
|
termio.c_lflag |= (ECHO | ECHOE | ECHOK | ICANON | ISIG);
|
||||||
tcsetattr (0, TCSANOW, &termio);
|
tcsetattr (0, TCSANOW, &termio);
|
||||||
#endif
|
|
||||||
|
|
||||||
Prog = Basename (argv[0]);
|
Prog = Basename (argv[0]);
|
||||||
log_set_progname(Prog);
|
log_set_progname(Prog);
|
||||||
|
Reference in New Issue
Block a user