remove extra dereference

This commit is contained in:
IncSW 2021-05-03 13:43:05 +03:00
parent 51905367ec
commit 1adac38695
No known key found for this signature in database
GPG Key ID: 89876FA64BFB2D57
1 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ func (d *sliceDecoder) decodeStream(s *stream, depth int64, p unsafe.Pointer) er
// assign new element to the slice
typedmemmove(d.elemType, ep, unsafe_New(d.elemType))
} else if d.isElemPointerType {
**(**unsafe.Pointer)(unsafe.Pointer(&ep)) = nil // initialize elem pointer
*(*unsafe.Pointer)(ep) = nil // initialize elem pointer
}
if err := d.valueDecoder.decodeStream(s, depth, ep); err != nil {
return err
@ -240,7 +240,7 @@ func (d *sliceDecoder) decode(buf []byte, cursor, depth int64, p unsafe.Pointer)
// assign new element to the slice
typedmemmove(d.elemType, ep, unsafe_New(d.elemType))
} else if d.isElemPointerType {
**(**unsafe.Pointer)(unsafe.Pointer(&ep)) = nil // initialize elem pointer
*(*unsafe.Pointer)(ep) = nil // initialize elem pointer
}
c, err := d.valueDecoder.decode(buf, cursor, depth, ep)
if err != nil {