aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vppinfra/bitmap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vppinfra/bitmap.h b/src/vppinfra/bitmap.h
index d6dfe86da0b..0e94d028ee3 100644
--- a/src/vppinfra/bitmap.h
+++ b/src/vppinfra/bitmap.h
@@ -728,6 +728,9 @@ clib_bitmap_next_clear (uword * ai, uword i)
if (t)
return log2_first_set (t) + i0 * BITS (ai[0]);
}
+
+ /* no clear bit left in bitmap, return bit just beyond bitmap */
+ return (i0 + 1) * BITS (ai[0]);
}
return i;
}