Use clear rather than manual zeroing for Bitmap.Reset.

PiperOrigin-RevId: 650449794
This commit is contained in:
Etienne Perot
2024-07-08 19:25:42 -07:00
committed by gVisor bot
parent 70bcf5d91b
commit fa204cf4cc
+1 -3
View File
@@ -253,9 +253,7 @@ func (b *Bitmap) FlipRange(begin, end uint32) {
// Reset zeroes the entire bitmap.
func (b *Bitmap) Reset() {
b.numOnes = 0
for i := range b.bitBlock {
b.bitBlock[i] = 0
}
clear(b.bitBlock)
}
// ForEach calls `f` for each set bit in the range [start, end).