=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/diff/diffreg.c,v retrieving revision 1.48 retrieving revision 1.49 diff -c -r1.48 -r1.49 *** src/usr.bin/diff/diffreg.c 2003/08/08 16:09:26 1.48 --- src/usr.bin/diff/diffreg.c 2003/08/13 20:44:15 1.49 *************** *** 1,4 **** ! /* $OpenBSD: diffreg.c,v 1.48 2003/08/08 16:09:26 otto Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. --- 1,4 ---- ! /* $OpenBSD: diffreg.c,v 1.49 2003/08/13 20:44:15 millert Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. *************** *** 65,71 **** */ #ifndef lint ! static const char rcsid[] = "$OpenBSD: diffreg.c,v 1.48 2003/08/08 16:09:26 otto Exp $"; #endif /* not lint */ #include --- 65,71 ---- */ #ifndef lint ! static const char rcsid[] = "$OpenBSD: diffreg.c,v 1.49 2003/08/13 20:44:15 millert Exp $"; #endif /* not lint */ #include *************** *** 634,640 **** { int i, k, y, j, l; int oldc, tc, oldl; ! u_int loopcount; const u_int bound = dflag ? UINT_MAX : max(256, isqrt(n)); --- 634,640 ---- { int i, k, y, j, l; int oldc, tc, oldl; ! u_int numtries; const u_int bound = dflag ? UINT_MAX : max(256, isqrt(n)); *************** *** 647,655 **** y = -b[j]; oldl = 0; oldc = c[0]; ! loopcount = 0; do { - loopcount++; if (y <= clist[oldc].y) continue; l = search(c, k, y); --- 647,654 ---- y = -b[j]; oldl = 0; oldc = c[0]; ! numtries = 0; do { if (y <= clist[oldc].y) continue; l = search(c, k, y); *************** *** 662,673 **** c[l] = newcand(i, y, oldc); oldc = tc; oldl = l; } else { c[l] = newcand(i, y, oldc); k++; break; } ! } while ((y = b[++j]) > 0 && loopcount < bound); } return (k); } --- 661,673 ---- c[l] = newcand(i, y, oldc); oldc = tc; oldl = l; + numtries++; } else { c[l] = newcand(i, y, oldc); k++; break; } ! } while ((y = b[++j]) > 0 && numtries < bound); } return (k); }