diff options
author | rgrimes <rgrimes@FreeBSD.org> | 1994-09-18 21:17:40 +0000 |
---|---|---|
committer | rgrimes <rgrimes@FreeBSD.org> | 1994-09-18 21:17:40 +0000 |
commit | b98c90be2e4e7635f6a431fe21bd5927a850b840 (patch) | |
tree | cec1784f94e1baa76dfd3637e01e44d44396d0a6 /usr.sbin/mtree/verify.c | |
parent | 10e98516daf367390bc752990d2da01ac56b167a (diff) | |
download | FreeBSD-src-b98c90be2e4e7635f6a431fe21bd5927a850b840.zip FreeBSD-src-b98c90be2e4e7635f6a431fe21bd5927a850b840.tar.gz |
1. Remove commented out CFLAGS+=-DDEBUG from Makefile
2. Clean up code so it compiles -Wall (except for sccsid's and copyright).
This included fixing several printf formats that where not correct,
and changing the data types of a few things.
3. Implement new option -i that produces indented mtree output files.
4. Implement new option -n that turns off directory comments.
5. Only emit /set records if something has changed since the last one.
Diffstat (limited to 'usr.sbin/mtree/verify.c')
-rw-r--r-- | usr.sbin/mtree/verify.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/mtree/verify.c b/usr.sbin/mtree/verify.c index 27d9b90..4abf0fb 100644 --- a/usr.sbin/mtree/verify.c +++ b/usr.sbin/mtree/verify.c @@ -46,7 +46,8 @@ static char sccsid[] = "@(#)verify.c 8.1 (Berkeley) 6/6/93"; #include "mtree.h" #include "extern.h" -extern int crc_total, ftsoptions; +extern long int crc_total; +extern int ftsoptions; extern int dflag, eflag, rflag, sflag, uflag; extern char fullpath[MAXPATHLEN]; @@ -82,7 +83,7 @@ vwalk() err("fts_open: %s", strerror(errno)); level = root; ftsdepth = specdepth = rval = 0; - while (p = fts_read(t)) { + while ((p = fts_read(t))) { switch(p->fts_info) { case FTS_D: ++ftsdepth; @@ -107,8 +108,8 @@ vwalk() } for (ep = level; ep; ep = ep->next) - if (ep->flags & F_MAGIC && - !fnmatch(ep->name, p->fts_name, FNM_PATHNAME) || + if ((ep->flags & F_MAGIC && + !fnmatch(ep->name, p->fts_name, FNM_PATHNAME)) || !strcmp(ep->name, p->fts_name)) { ep->flags |= F_VISIT; if (compare(ep->name, ep, p)) |