diff options
author | Sascha Grunert <sgrunert@suse.com> | 2020-08-27 21:14:55 +0200 |
---|---|---|
committer | Sascha Grunert <sgrunert@suse.com> | 2020-08-27 21:14:59 +0200 |
commit | 98ead36531378ea22d1298235a10ce476f20391d (patch) | |
tree | 59c898ae69ab9f5d13e255f2575200f1329e003e /vendor/github.com/klauspost/compress/huff0/bitwriter.go | |
parent | 72c5b35ea5db44ca1c81a688d90f5c3aa8f8262e (diff) | |
download | podman-98ead36531378ea22d1298235a10ce476f20391d.tar.gz podman-98ead36531378ea22d1298235a10ce476f20391d.tar.bz2 podman-98ead36531378ea22d1298235a10ce476f20391d.zip |
Switch to containers/common for seccomp
The seccomp/containers-golang library is not maintained any more and we
should stick to containers/common.
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Diffstat (limited to 'vendor/github.com/klauspost/compress/huff0/bitwriter.go')
-rw-r--r-- | vendor/github.com/klauspost/compress/huff0/bitwriter.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/vendor/github.com/klauspost/compress/huff0/bitwriter.go b/vendor/github.com/klauspost/compress/huff0/bitwriter.go index bda4021ef..6bce4e87d 100644 --- a/vendor/github.com/klauspost/compress/huff0/bitwriter.go +++ b/vendor/github.com/klauspost/compress/huff0/bitwriter.go @@ -43,6 +43,11 @@ func (b *bitWriter) addBits16Clean(value uint16, bits uint8) { func (b *bitWriter) encSymbol(ct cTable, symbol byte) { enc := ct[symbol] b.bitContainer |= uint64(enc.val) << (b.nBits & 63) + if false { + if enc.nBits == 0 { + panic("nbits 0") + } + } b.nBits += enc.nBits } @@ -54,6 +59,14 @@ func (b *bitWriter) encTwoSymbols(ct cTable, av, bv byte) { sh := b.nBits & 63 combined := uint64(encA.val) | (uint64(encB.val) << (encA.nBits & 63)) b.bitContainer |= combined << sh + if false { + if encA.nBits == 0 { + panic("nbitsA 0") + } + if encB.nBits == 0 { + panic("nbitsB 0") + } + } b.nBits += encA.nBits + encB.nBits } |