this nil-pointer safeguard has itself a nil-pointer deref, so it is useless

This commit is contained in:
Cassondra Foesch 2021-07-02 08:42:04 +00:00
parent 35cb1f0616
commit a4ed48f12a
1 changed files with 0 additions and 5 deletions

View File

@ -15,11 +15,6 @@ func newBufPool(depth, bufLen int) *bufPool {
} }
func (p *bufPool) Get() []byte { func (p *bufPool) Get() []byte {
if p == nil {
// functional default: no reuse.
return make([]byte, p.blen)
}
for { for {
select { select {
case b := <-p.ch: case b := <-p.ch: