diff options
author | Damjan Marion <damarion@cisco.com> | 2022-03-17 18:59:46 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2022-03-18 13:16:36 +0000 |
commit | 66d4cb5a217d556aa7bd2471f02a39badb6d5cd2 (patch) | |
tree | 53d4333bed2cdfc16e5e1d5858e6a70fab9bc1ca /src/vppinfra/bitmap.h | |
parent | 05563c9a904b6bb862ba783dc3519c8415bf9cf5 (diff) |
vppinfra: refactor *_will_expand() functions
Type: refactor
Change-Id: I3625eacf9e04542ca8778df5d46075a8654642c7
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/bitmap.h')
-rw-r--r-- | src/vppinfra/bitmap.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/vppinfra/bitmap.h b/src/vppinfra/bitmap.h index 459e6f2b9b4..096d3f1aa4a 100644 --- a/src/vppinfra/bitmap.h +++ b/src/vppinfra/bitmap.h @@ -208,9 +208,7 @@ clib_bitmap_set (uword * ai, uword i, uword value) always_inline u8 clib_bitmap_will_expand (uword *ai, uword i) { - uword i0 = i / BITS (ai[0]); - return _vec_resize_will_expand (ai, 1, i0 * sizeof (ai[0]), 0, - sizeof (uword)); + return (i / BITS (ai[0])) < vec_max_len (ai); } /** Gets the ith bit value from a bitmap |