diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-11-21 19:36:05 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-11-21 19:36:05 +0000 |
commit | 70207ab18d1da41062d1527b0c5af927514b001f (patch) | |
tree | ca854293a98114ef0508586dc6c722d36a040724 /usr.sbin/mtree/compare.c | |
parent | 8672a91409f46bf49aed6ee27e4ad5bc514e09fa (diff) |
Use the same ordering when verifying as with creating and replace
some hardcoded constants with symbolic ones. Noted by Ed Wandasiewicz
in PR 3991.
ok deraadt@ millert@
Diffstat (limited to 'usr.sbin/mtree/compare.c')
-rw-r--r-- | usr.sbin/mtree/compare.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/mtree/compare.c b/usr.sbin/mtree/compare.c index 4492126250d..cac8e967cad 100644 --- a/usr.sbin/mtree/compare.c +++ b/usr.sbin/mtree/compare.c @@ -1,5 +1,5 @@ /* $NetBSD: compare.c,v 1.11 1996/09/05 09:56:48 mycroft Exp $ */ -/* $OpenBSD: compare.c,v 1.19 2004/08/01 18:32:20 deraadt Exp $ */ +/* $OpenBSD: compare.c,v 1.20 2004/11/21 19:36:04 otto Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -34,7 +34,7 @@ #if 0 static const char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93"; #else -static const char rcsid[] = "$OpenBSD: compare.c,v 1.19 2004/08/01 18:32:20 deraadt Exp $"; +static const char rcsid[] = "$OpenBSD: compare.c,v 1.20 2004/11/21 19:36:04 otto Exp $"; #endif #endif /* not lint */ @@ -264,7 +264,7 @@ typeerr: LABEL; } } if (s->flags & F_RMD160) { - char *new_digest, buf[41]; + char *new_digest, buf[RMD160_DIGEST_STRING_LENGTH]; new_digest = RMD160File(p->fts_accpath, buf); if (!new_digest) { @@ -280,7 +280,7 @@ typeerr: LABEL; } } if (s->flags & F_SHA1) { - char *new_digest, buf[41]; + char *new_digest, buf[SHA1_DIGEST_STRING_LENGTH]; new_digest = SHA1File(p->fts_accpath, buf); if (!new_digest) { |