summaryrefslogtreecommitdiff
path: root/usr.sbin/edquota
diff options
context:
space:
mode:
authorPhilippe Charnier <charnier@FreeBSD.org>2006-09-14 04:45:44 +0000
committerPhilippe Charnier <charnier@FreeBSD.org>2006-09-14 04:45:44 +0000
commit606a36b9ebf65870aab969dc10f0c00cca75eb11 (patch)
treeb7542d38ece27be83548cd000a5d2a19b0e0358b /usr.sbin/edquota
parent9773a00fa7f0cc7d63c2bea482686141c0e316d9 (diff)
downloadsrc-test2-606a36b9ebf65870aab969dc10f0c00cca75eb11.tar.gz
src-test2-606a36b9ebf65870aab969dc10f0c00cca75eb11.zip
Notes
Diffstat (limited to 'usr.sbin/edquota')
-rw-r--r--usr.sbin/edquota/edquota.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/edquota/edquota.c b/usr.sbin/edquota/edquota.c
index c73e7de06125..1edca4a39976 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) &&