Fix to match new MD5 api, faster.

This commit is contained in:
Poul-Henning Kamp 1995-07-12 09:15:15 +00:00
parent 116805fd7a
commit 9010366de8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9490
2 changed files with 4 additions and 7 deletions

View file

@ -202,9 +202,9 @@ typeerr: LABEL;
tab = "\t";
}
if (s->flags & F_MD5) {
char *new_digest;
char *new_digest, buf[33];
new_digest = MD5File(p->fts_accpath);
new_digest = MD5File(p->fts_accpath,buf);
if (!new_digest) {
LABEL;
printf("%sMD5File: %s: %s\n", tab, p->fts_accpath,
@ -215,9 +215,6 @@ typeerr: LABEL;
printf("%sMD5 (%s, %s)\n", tab, s->md5digest,
new_digest);
tab = "\t";
free(new_digest);
} else {
free(new_digest);
}
}

View file

@ -189,13 +189,13 @@ statf(indent, p)
output(indent, &offset, "cksum=%lu", val);
}
if (keys & F_MD5 && S_ISREG(p->fts_statp->st_mode)) {
char *md5digest = MD5File(p->fts_accpath);
char *md5digest, buf[33];
md5digest = MD5File(p->fts_accpath,buf);
if (!md5digest) {
err("%s: %s", p->fts_accpath, strerror(errno));
} else {
output(indent, &offset, "md5digest=%s", md5digest);
free(md5digest);
}
}
if (keys & F_SLINK &&