vppinfra: fix bitmap can't get correct next clear index
when bitmap vec len is 1 and all the bits has been
occupied, clib_bitmap_next_clear(ai, 63) will
return result:65 which should be 64. It will lead to
missing iteration for pool_foreach.
Type: fix
@@ -742,8 +742,7 @@ clib_bitmap_next_clear (uword * ai, uword i)
return log2_first_set (t) + i0 * BITS (ai[0]);
}
- /* no clear bit left in bitmap, return bit just beyond bitmap */
- return (i0 * BITS (ai[0])) + 1;
+ return i0 * BITS (ai[0]);
}
return i;
}
