-Wall fixes.

Submitted by:	nrahlstr
This commit is contained in:
Bill Fumerola 1999-09-27 00:36:03 +00:00
parent 18b039eb04
commit a590ad80ac
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=51705
4 changed files with 9 additions and 5 deletions

View File

@ -532,6 +532,7 @@ compare(int from_fd, const char *from_name, int to_fd, const char *to_name,
size_t tsize;
int done_compare;
rv = 0;
if (from_sb->st_size != to_sb->st_size)
return 1;

View File

@ -194,7 +194,7 @@ typeerr: LABEL;
ctime(&p->fts_statp->st_mtimespec.tv_sec));
tab = "\t";
}
if (s->flags & F_CKSUM)
if (s->flags & F_CKSUM) {
if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0) {
LABEL;
(void)printf("%scksum: %s: %s\n",
@ -215,6 +215,7 @@ typeerr: LABEL;
}
tab = "\t";
}
}
#ifdef MD5
if (s->flags & F_MD5) {
char *new_digest, buf[33];

View File

@ -320,22 +320,24 @@ statd(t, parent, puid, pgid, pmode)
(void)printf("/set type=dir");
else
(void)printf("/set type=file");
if (keys & F_UNAME)
if (keys & F_UNAME) {
if ((pw = getpwuid(saveuid)) != NULL)
(void)printf(" uname=%s", pw->pw_name);
else
errx(1,
"line %d: could not get uname for uid=%u",
lineno, saveuid);
}
if (keys & F_UID)
(void)printf(" uid=%lu", (u_long)saveuid);
if (keys & F_GNAME)
if (keys & F_GNAME) {
if ((gr = getgrgid(savegid)) != NULL)
(void)printf(" gname=%s", gr->gr_name);
else
errx(1,
"line %d: could not get gname for gid=%u",
lineno, savegid);
}
if (keys & F_GID)
(void)printf(" gid=%lu", (u_long)savegid);
if (keys & F_MODE)

View File

@ -173,7 +173,7 @@ miss(p, tail)
}
create = 0;
if (!(p->flags & F_VISIT) && uflag)
if (!(p->flags & F_VISIT) && uflag) {
if (!(p->flags & (F_UID | F_UNAME)))
(void)printf(" (directory not created: user not specified)");
else if (!(p->flags & (F_GID | F_GNAME)))
@ -187,7 +187,7 @@ miss(p, tail)
create = 1;
(void)printf(" (created)");
}
}
if (!(p->flags & F_VISIT))
(void)putchar('\n');