X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=ewah%2Fbitmap.c;h=d8cec585af97e66e0534c1cebd32f2cdf022d382;hb=38afd2d1ad8afc59e3bed02b8c4be2080e8e5150;hp=b5fed9621f425b08af27c56be0e3f88a331e314b;hpb=4a77434bc83c07c17ddc321b3892337b5533eda1;p=thirdparty%2Fgit.git diff --git a/ewah/bitmap.c b/ewah/bitmap.c index b5fed9621f..d8cec585af 100644 --- a/ewah/bitmap.c +++ b/ewah/bitmap.c @@ -50,6 +50,14 @@ void bitmap_set(struct bitmap *self, size_t pos) self->words[block] |= EWAH_MASK(pos); } +void bitmap_unset(struct bitmap *self, size_t pos) +{ + size_t block = EWAH_BLOCK(pos); + + if (block < self->word_alloc) + self->words[block] &= ~EWAH_MASK(pos); +} + int bitmap_get(struct bitmap *self, size_t pos) { size_t block = EWAH_BLOCK(pos);