mirror of
https://github.com/pion/stun.git
synced 2025-09-26 20:01:18 +08:00
Remove redundant zero assignment in addr.go
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
This commit is contained in:
1
addr.go
1
addr.go
@@ -113,7 +113,6 @@ func (a *MappedAddress) AddToAs(msg *Message, attrType AttrType) error {
|
|||||||
return ErrBadIPLength
|
return ErrBadIPLength
|
||||||
}
|
}
|
||||||
value := make([]byte, 128)
|
value := make([]byte, 128)
|
||||||
value[0] = 0 // first 8 bits are zeroes
|
|
||||||
bin.PutUint16(value[0:2], family)
|
bin.PutUint16(value[0:2], family)
|
||||||
bin.PutUint16(value[2:4], uint16(a.Port)) //nolint:gosec //G115
|
bin.PutUint16(value[2:4], uint16(a.Port)) //nolint:gosec //G115
|
||||||
copy(value[4:], ip)
|
copy(value[4:], ip)
|
||||||
|
Reference in New Issue
Block a user