diff options
author | charnier <charnier@FreeBSD.org> | 2006-09-14 04:45:44 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 2006-09-14 04:45:44 +0000 |
commit | 5543d8318673c05f92128384c952e52a95cc0093 (patch) | |
tree | b7542d38ece27be83548cd000a5d2a19b0e0358b /usr.sbin/edquota | |
parent | 140b3626da483266851d6af04df65d138d06ab2e (diff) | |
download | FreeBSD-src-5543d8318673c05f92128384c952e52a95cc0093.zip FreeBSD-src-5543d8318673c05f92128384c952e52a95cc0093.tar.gz |
initialize unitialized variables (WARNS=6)
Diffstat (limited to 'usr.sbin/edquota')
-rw-r--r-- | usr.sbin/edquota/edquota.c | 8 |
1 files changed, 6 insertions, 2 deletions
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 <sys/cdefs.h> __FBSDID("$FreeBSD$"); /* * Disk quota editor. */ + #include <sys/param.h> #include <sys/stat.h> #include <sys/file.h> @@ -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) && |