initialize unitialized variables (WARNS=6)

This commit is contained in:
Philippe Charnier 2006-09-14 04:45:44 +00:00
parent 9773a00fa7
commit 606a36b9eb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=162295

View File

@ -41,12 +41,14 @@ static const char copyright[] =
static char sccsid[] = "@(#)edquota.c 8.1 (Berkeley) 6/6/93"; static char sccsid[] = "@(#)edquota.c 8.1 (Berkeley) 6/6/93";
#endif /* not lint */ #endif /* not lint */
#endif #endif
#include <sys/cdefs.h> #include <sys/cdefs.h>
__FBSDID("$FreeBSD$"); __FBSDID("$FreeBSD$");
/* /*
* Disk quota editor. * Disk quota editor.
*/ */
#include <sys/param.h> #include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/file.h> #include <sys/file.h>
@ -114,6 +116,8 @@ main(int argc, char **argv)
errx(1, "permission denied"); errx(1, "permission denied");
quotatype = USRQUOTA; quotatype = USRQUOTA;
protoprivs = NULL; protoprivs = NULL;
curprivs = NULL;
protoname = NULL;
while ((ch = getopt(argc, argv, "ugtf:p:e:")) != -1) { while ((ch = getopt(argc, argv, "ugtf:p:e:")) != -1) {
switch(ch) { switch(ch) {
case 'f': case 'f':
@ -252,7 +256,7 @@ main(int argc, char **argv)
if (writetimes(protoprivs, tmpfd, quotatype) == 0) if (writetimes(protoprivs, tmpfd, quotatype) == 0)
exit(1); exit(1);
if (editit(tmpfil) && readtimes(protoprivs, tmpfil)) if (editit(tmpfil) && readtimes(protoprivs, tmpfil))
putprivs(0, quotatype, protoprivs); putprivs(0L, quotatype, protoprivs);
freeprivs(protoprivs); freeprivs(protoprivs);
close(tmpfd); close(tmpfd);
unlink(tmpfil); unlink(tmpfil);
@ -339,7 +343,7 @@ getprivs(id, quotatype, fspath)
static int warned = 0; static int warned = 0;
setfsent(); setfsent();
quphead = (struct quotause *)0; quphead = quptail = NULL;
qcmd = QCMD(Q_GETQUOTA, quotatype); qcmd = QCMD(Q_GETQUOTA, quotatype);
while ((fs = getfsent())) { while ((fs = getfsent())) {
if (fspath && *fspath && strcmp(fspath, fs->fs_spec) && if (fspath && *fspath && strcmp(fspath, fs->fs_spec) &&