diff --git a/usr.bin/cmp/regular.c b/usr.bin/cmp/regular.c index 551ac5109a35..4446e79e0872 100644 --- a/usr.bin/cmp/regular.c +++ b/usr.bin/cmp/regular.c @@ -1,4 +1,4 @@ -/* $NetBSD: regular.c,v 1.14 2005/02/06 21:19:46 dsl Exp $ */ +/* $NetBSD: regular.c,v 1.15 2005/03/07 07:51:42 dsl Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)regular.c 8.3 (Berkeley) 4/2/94"; #else -__RCSID("$NetBSD: regular.c,v 1.14 2005/02/06 21:19:46 dsl Exp $"); +__RCSID("$NetBSD: regular.c,v 1.15 2005/03/07 07:51:42 dsl Exp $"); #endif #endif /* not lint */ @@ -69,6 +69,7 @@ c_regular(int fd1, char *file1, off_t skip1, off_t len1, eofmsg(file2); len2 -= skip2; + dfound = 0; length = MIN(len1, len2); for (blk_sz = 1024 * 1024; length != 0; length -= blk_sz) { if (blk_sz > length) @@ -83,7 +84,6 @@ c_regular(int fd1, char *file1, off_t skip1, off_t len1, goto mmap_failed; } - dfound = 0; blk_cnt = blk_sz; for (byte = line = 1; blk_cnt--; ++p1, ++p2, ++byte) { if ((ch = *p1) != *p2) {