We don't need 'static', because it's in main(), which is only called
once. However, we will need initialization as if it were 'static', so
use ={} to initialize it. This will allow freeing the pointers before
they have been allocated.
Cc: Samanta Navarro <ferivoz@riseup.net>
Suggested-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
_exit (1);
}
-/*ARGSUSED*/ int main (int argc, char **argv)
+
+/*ARGSUSED*/ int
+main(int argc, char **argv)
{
int err = 0;
char pass[BUFSIZ];
char **envp = environ;
TERMIO termio;
+ struct passwd pwent = {};
#ifndef USE_PAM
const char *env;
#endif
- static struct passwd pwent;
tcgetattr (0, &termio);
termio.c_iflag |= (ICRNL | IXON);