Displaying 1 result from an estimated 1 matches for "cur_negimage".
2000 May 02
0
patch for .samba-2.0.7/source/lib/bitmap.c
...urn False;
}
@@ -94,37 +101,109 @@
find a zero bit in a bitmap starting at the specified offset, with
wraparound
****************************************************************************/
int bitmap_find(struct bitmap *bm, unsigned ofs)
{
- int i, j;
+ uint32 ofs_negimage;
+ uint32 cur_negimage;
+ int ofsseg, ofsoff;
+ int iseg;
+ int result;
+
+ if ( ofs >= bm->n ) {
+ ofs = 0;
+ }
+
+ ofsseg = ofs / UINT32_BITS;
+ ofsoff = ofs % UINT32_BITS;
+
+ /* first, we have to treat first segment special */
+ ofs_negimage = ( ~( bm-...