On Mon, 4 Feb 2002, Alfred Perlstein wrote:
> * Bruce Evans <[EMAIL PROTECTED]> [020204 05:26] wrote:
> > This patch just backs out the change to NBBY.
>
> Wouldn't this make more sense:
>
> Index: ffs/ffs_alloc.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/ufs/ffs/ffs_alloc.c,v
> retrieving revision 1.86
> diff -u -r1.86 ffs_alloc.c
> --- ffs/ffs_alloc.c 2 Feb 2002 01:42:44 -0000 1.86
> +++ ffs/ffs_alloc.c 4 Feb 2002 16:08:34 -0000
> @@ -1790,7 +1790,7 @@
> end = start + fs->fs_contigsumsize;
> if (end >= cgp->cg_nclusterblks)
> end = cgp->cg_nclusterblks;
> - mapp = &freemapp[start / NBBY];
> + mapp = &freemapp[start < 0 ? 0 : start / NBBY];
> map = *mapp++;
> bit = 1 << (start % NBBY);
> for (i = start; i < end; i++) {
>
Except it doesn't fix the potentially millions of other lines that are
affected by the fix, and leaves at best confusing code: mapp, map and
bit are unitialized to bogus values. This seems to be harmless because
they are not used (the loop is iterated 0 times if start < 0).
Bruce
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message