src/sulogin.c: Make static variables local to main()
Those variables are only used in main(). Restrict their scope. Keep them static (.bss), as changing that may be dangerous. Suggested-by: Samanta Navarro <ferivoz@riseup.net> Cc: Serge Hallyn <serge@hallyn.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
committed by
Serge Hallyn
parent
5214710432
commit
1faf4d6469
+4
-4
@@ -37,9 +37,6 @@
|
||||
*/
|
||||
const char *Prog;
|
||||
|
||||
static char pass[BUFSIZ];
|
||||
|
||||
static struct passwd pwent;
|
||||
|
||||
extern char **newenvp;
|
||||
extern size_t newenvc;
|
||||
@@ -58,7 +55,7 @@ static void catch_signals (unused int sig)
|
||||
_exit (1);
|
||||
}
|
||||
|
||||
/*ARGSUSED*/ int main (int argc, char **argv)
|
||||
/*ARGSUSED*/ int main (int argc, char **argv)
|
||||
{
|
||||
#ifndef USE_PAM
|
||||
const char *env;
|
||||
@@ -67,6 +64,9 @@ static void catch_signals (unused int sig)
|
||||
TERMIO termio;
|
||||
int err = 0;
|
||||
|
||||
static char pass[BUFSIZ];
|
||||
static struct passwd pwent;
|
||||
|
||||
tcgetattr (0, &termio);
|
||||
termio.c_iflag |= (ICRNL | IXON);
|
||||
termio.c_oflag |= (CREAD);
|
||||
|
||||
Reference in New Issue
Block a user