Skip to content

Commit 50100d8

Browse files
cppcoffeeSean-Der
authored andcommitted
Remove redundant zero assignment in addr.go
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
1 parent 8721ffc commit 50100d8

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

addr.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ func (a *MappedAddress) AddToAs(msg *Message, attrType AttrType) error {
113113
return ErrBadIPLength
114114
}
115115
value := make([]byte, 128)
116-
value[0] = 0 // first 8 bits are zeroes
117116
bin.PutUint16(value[0:2], family)
118117
bin.PutUint16(value[2:4], uint16(a.Port)) //nolint:gosec //G115
119118
copy(value[4:], ip)

0 commit comments

Comments
 (0)