summaryrefslogtreecommitdiffstats
path: root/usr.sbin/jail
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2004-11-17 10:01:48 +0000
committerdelphij <delphij@FreeBSD.org>2004-11-17 10:01:48 +0000
commit65c65c74d43a3f0631abd782bc74e25722f5571c (patch)
treeab5f534e68d9c47c8b17da2f33802fc0bea02360 /usr.sbin/jail
parent0c3804bf6558d87ff5fc9d54cf8da178455d475c (diff)
downloadFreeBSD-src-65c65c74d43a3f0631abd782bc74e25722f5571c.zip
FreeBSD-src-65c65c74d43a3f0631abd782bc74e25722f5571c.tar.gz
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.
Diffstat (limited to 'usr.sbin/jail')
-rw-r--r--usr.sbin/jail/Makefile2
-rw-r--r--usr.sbin/jail/jail.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/jail/Makefile b/usr.sbin/jail/Makefile
index 7181928..812cbc9 100644
--- a/usr.sbin/jail/Makefile
+++ b/usr.sbin/jail/Makefile
@@ -5,6 +5,6 @@ MAN= jail.8
DPADD= ${LIBUTIL}
LDADD= -lutil
-WARNS?= 2
+WARNS?= 6
.include <bsd.prog.mk>
diff --git a/usr.sbin/jail/jail.c b/usr.sbin/jail/jail.c
index e0fac1c..84cab55 100644
--- a/usr.sbin/jail/jail.c
+++ b/usr.sbin/jail/jail.c
@@ -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;
OpenPOWER on IntegriCloud