Remove redundant zero assignment in addr.go

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
This commit is contained in:
Xiaobo Liu
2025-09-04 19:18:21 +08:00
committed by Sean DuBois
parent 8721ffcc62
commit 50100d8c8a

View File

@@ -113,7 +113,6 @@ func (a *MappedAddress) AddToAs(msg *Message, attrType AttrType) error {
return ErrBadIPLength
}
value := make([]byte, 128)
value[0] = 0 // first 8 bits are zeroes
bin.PutUint16(value[0:2], family)
bin.PutUint16(value[2:4], uint16(a.Port)) //nolint:gosec //G115
copy(value[4:], ip)