Author: kib
Date: Sun Jan 18 11:47:39 2009
New Revision: 187386
URL: http://svn.freebsd.org/changeset/base/187386

Log:
  MFC r186740:
  Do not incorrectly add the low 5 bits of the offset to the resulting
  position of the found zero bit.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/gnu/fs/ext2fs/ext2_bitops.h

Modified: stable/7/sys/gnu/fs/ext2fs/ext2_bitops.h
==============================================================================
--- stable/7/sys/gnu/fs/ext2fs/ext2_bitops.h    Sun Jan 18 11:43:23 2009        
(r187385)
+++ stable/7/sys/gnu/fs/ext2fs/ext2_bitops.h    Sun Jan 18 11:47:39 2009        
(r187386)
@@ -84,7 +84,7 @@ find_next_zero_bit(void *data, size_t sz
                mask = ~0U << (ofs & 31);
                bit = *p | ~mask;
                if (bit != ~0U)
-                       return (ffs(~bit) + ofs - 1);
+                       return (ffs(~bit) + (ofs & ~31U) - 1);
                p++;
                ofs = (ofs + 31U) & ~31U;
        }
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to