diff options
author | alfred <alfred@FreeBSD.org> | 2002-07-11 18:42:53 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-07-11 18:42:53 +0000 |
commit | 5071cb67d9de457e855d238f7e46baee9a178971 (patch) | |
tree | 3e51b873516046d990798f5eea0189b996d75ce7 /usr.sbin/mtree/create.c | |
parent | c40ae61c8c183033b215d5e580b876d7f4b55a89 (diff) | |
download | FreeBSD-src-5071cb67d9de457e855d238f7e46baee9a178971.zip FreeBSD-src-5071cb67d9de457e855d238f7e46baee9a178971.tar.gz |
fixup for WARNS=4.
Diffstat (limited to 'usr.sbin/mtree/create.c')
-rw-r--r-- | usr.sbin/mtree/create.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.sbin/mtree/create.c b/usr.sbin/mtree/create.c index a7dfc67..3db0502 100644 --- a/usr.sbin/mtree/create.c +++ b/usr.sbin/mtree/create.c @@ -89,17 +89,18 @@ cwalk() { register FTS *t; register FTSENT *p; - time_t clock; + time_t cl; char *argv[2], host[MAXHOSTNAMELEN]; + char dot[] = "."; int indent = 0; - (void)time(&clock); + (void)time(&cl); (void)gethostname(host, sizeof(host)); (void)printf( "#\t user: %s\n#\tmachine: %s\n#\t tree: %s\n#\t date: %s", - getlogin(), host, fullpath, ctime(&clock)); + getlogin(), host, fullpath, ctime(&cl)); - argv[0] = "."; + argv[0] = dot; argv[1] = NULL; if ((t = fts_open(argv, ftsoptions, dsort)) == NULL) err(1, "line %d: fts_open", lineno); @@ -208,7 +209,7 @@ statf(indent, p) output(indent, &offset, "size=%qd", p->fts_statp->st_size); if (keys & F_TIME) output(indent, &offset, "time=%ld.%ld", - p->fts_statp->st_mtimespec.tv_sec, + (long)p->fts_statp->st_mtimespec.tv_sec, p->fts_statp->st_mtimespec.tv_nsec); if (keys & F_CKSUM && S_ISREG(p->fts_statp->st_mode)) { if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0 || |