From d1df3fcd3f5c8f458720bcc04029ddc60a196283 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Wed, 17 Nov 2004 10:01:48 +0000 Subject: [PATCH] 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. --- usr.sbin/jail/Makefile | 2 +- usr.sbin/jail/jail.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/jail/Makefile b/usr.sbin/jail/Makefile index 71819285ddf..812cbc96c76 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 diff --git a/usr.sbin/jail/jail.c b/usr.sbin/jail/jail.c index e0fac1cd60c..84cab551536 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;