From 5543d8318673c05f92128384c952e52a95cc0093 Mon Sep 17 00:00:00 2001 From: charnier Date: Thu, 14 Sep 2006 04:45:44 +0000 Subject: initialize unitialized variables (WARNS=6) --- usr.sbin/edquota/edquota.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'usr.sbin/edquota') diff --git a/usr.sbin/edquota/edquota.c b/usr.sbin/edquota/edquota.c index c73e7de..1edca4a 100644 --- a/usr.sbin/edquota/edquota.c +++ b/usr.sbin/edquota/edquota.c @@ -41,12 +41,14 @@ static const char copyright[] = static char sccsid[] = "@(#)edquota.c 8.1 (Berkeley) 6/6/93"; #endif /* not lint */ #endif + #include __FBSDID("$FreeBSD$"); /* * Disk quota editor. */ + #include #include #include @@ -114,6 +116,8 @@ main(int argc, char **argv) errx(1, "permission denied"); quotatype = USRQUOTA; protoprivs = NULL; + curprivs = NULL; + protoname = NULL; while ((ch = getopt(argc, argv, "ugtf:p:e:")) != -1) { switch(ch) { case 'f': @@ -252,7 +256,7 @@ main(int argc, char **argv) if (writetimes(protoprivs, tmpfd, quotatype) == 0) exit(1); if (editit(tmpfil) && readtimes(protoprivs, tmpfil)) - putprivs(0, quotatype, protoprivs); + putprivs(0L, quotatype, protoprivs); freeprivs(protoprivs); close(tmpfd); unlink(tmpfil); @@ -339,7 +343,7 @@ getprivs(id, quotatype, fspath) static int warned = 0; setfsent(); - quphead = (struct quotause *)0; + quphead = quptail = NULL; qcmd = QCMD(Q_GETQUOTA, quotatype); while ((fs = getfsent())) { if (fspath && *fspath && strcmp(fspath, fs->fs_spec) && -- cgit v1.1