summaryrefslogtreecommitdiff
path: root/vendor/github.com/klauspost/compress/zstd/decoder.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-04-21 15:41:46 -0400
committerGitHub <noreply@github.com>2021-04-21 15:41:46 -0400
commit5c8ba488078c7ee71e5b3a2cbb2bf770734d6c81 (patch)
tree7b6ec387c3006e83c4e3168412e9e70e5565ff45 /vendor/github.com/klauspost/compress/zstd/decoder.go
parent897f6c3a4a55bfc82a989c81cb3dc8998965c408 (diff)
parent5aef11026a850bb99d8394dba17810bf05d727bc (diff)
downloadpodman-5c8ba488078c7ee71e5b3a2cbb2bf770734d6c81.tar.gz
podman-5c8ba488078c7ee71e5b3a2cbb2bf770734d6c81.tar.bz2
podman-5c8ba488078c7ee71e5b3a2cbb2bf770734d6c81.zip
Merge pull request #10097 from containers/dependabot/go_modules/github.com/containers/storage-1.30.0
Bump github.com/containers/storage from 1.29.0 to 1.30.0
Diffstat (limited to 'vendor/github.com/klauspost/compress/zstd/decoder.go')
-rw-r--r--vendor/github.com/klauspost/compress/zstd/decoder.go26
1 files changed, 11 insertions, 15 deletions
diff --git a/vendor/github.com/klauspost/compress/zstd/decoder.go b/vendor/github.com/klauspost/compress/zstd/decoder.go
index 1d41c25d2..f593e464b 100644
--- a/vendor/github.com/klauspost/compress/zstd/decoder.go
+++ b/vendor/github.com/klauspost/compress/zstd/decoder.go
@@ -179,8 +179,7 @@ func (d *Decoder) Reset(r io.Reader) error {
// If bytes buffer and < 1MB, do sync decoding anyway.
if bb, ok := r.(byter); ok && bb.Len() < 1<<20 {
- var bb2 byter
- bb2 = bb
+ bb2 := bb
if debug {
println("*bytes.Buffer detected, doing sync decode, len:", bb.Len())
}
@@ -237,20 +236,17 @@ func (d *Decoder) drainOutput() {
println("current already flushed")
return
}
- for {
- select {
- case v := <-d.current.output:
- if v.d != nil {
- if debug {
- printf("re-adding decoder %p", v.d)
- }
- d.decoders <- v.d
- }
- if v.err == errEndOfStream {
- println("current flushed")
- d.current.flushed = true
- return
+ for v := range d.current.output {
+ if v.d != nil {
+ if debug {
+ printf("re-adding decoder %p", v.d)
}
+ d.decoders <- v.d
+ }
+ if v.err == errEndOfStream {
+ println("current flushed")
+ d.current.flushed = true
+ return
}
}
}