mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Use clear rather than manual zeroing for Bitmap.Reset.
PiperOrigin-RevId: 650449794
This commit is contained in:
committed by
gVisor bot
parent
70bcf5d91b
commit
fa204cf4cc
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user