Initialize lcap and pwd to NULL. This allows a WARNS=6 clean build,
hence bump it to 6. Note that the last commit message was not quite accurate. While the assumption exists in the code, it's not possible to have an uninitialized p there because if lflag is set when username is NULL then execution would be terminated earlier.
This commit is contained in:
parent
95751846f1
commit
d1df3fcd3f
@ -5,6 +5,6 @@ MAN= jail.8
|
||||
DPADD= ${LIBUTIL}
|
||||
LDADD= -lutil
|
||||
|
||||
WARNS?= 2
|
||||
WARNS?= 6
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -49,9 +49,9 @@ extern char **environ;
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
login_cap_t *lcap;
|
||||
login_cap_t *lcap = NULL;
|
||||
struct jail j;
|
||||
struct passwd *pwd;
|
||||
struct passwd *pwd = NULL;
|
||||
struct in_addr in;
|
||||
gid_t groups[NGROUPS];
|
||||
int ch, i, iflag, lflag, ngroups, uflag, Uflag;
|
||||
|
Loading…
Reference in New Issue
Block a user