stop setting N on a frozen container

This commit is contained in:
Travis 2020-08-14 17:25:14 -05:00 committed by Matt Jaffee
parent 76dbedc082
commit 6cd5b4fbbd
No known key found for this signature in database
GPG key ID: 08A3DFFF987B11BF

View file

@ -3197,10 +3197,6 @@ func (c *Container) arrayRemove(v uint16) (*Container, bool) {
}
// removing the last item? we can just return the empty container.
if c.N() == 1 {
if c.flags&(flagFrozen|flagMapped) != 0 {
fmt.Fprintf(os.Stderr, "INCONSISTENT: array remove of %d setting N in another container\n", v)
}
c.n = 0
return nil, true
}
c = c.Thaw()
@ -3217,10 +3213,6 @@ func (c *Container) bitmapRemove(v uint16) (*Container, bool) {
}
// removing the last item? we can just return the empty container.
if c.N() == 1 {
if c.flags&(flagFrozen|flagMapped) != 0 {
fmt.Fprintf(os.Stderr, "INCONSISTENT: bitmap remove of %d setting N in another container\n", v)
}
c.n = 0
return nil, true
}
c = c.Thaw()
@ -3246,10 +3238,6 @@ func (c *Container) runRemove(v uint16) (*Container, bool) {
}
// removing the last item? we can just return the empty container.
if c.N() == 1 {
if c.flags&(flagFrozen|flagMapped) != 0 {
fmt.Fprintf(os.Stderr, "INCONSISTENT: run remove of %d setting N in another container\n", v)
}
c.n = 0
return nil, true
}
c = c.Thaw()