Skip to content

Commit dec2506

Browse files
committed
Fix usage of net.IP as pointer
1 parent 6e41972 commit dec2506

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

protocols/ospf/packetv3/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ type deserializableIP struct {
6565
}
6666

6767
func (ip deserializableIP) ToNetIP() net.IP {
68-
return *(net.IPv6(ip.Higher, ip.Lower))
68+
return net.IPv6(ip.Higher, ip.Lower)
6969
}
7070

7171
func serializeIPv6(ip net.IP, buf *bytes.Buffer) {

protocols/ospf/packetv3/lsa_prefix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func DeserializeLSAPrefix(buf *bytes.Buffer) (LSAPrefix, int, error) {
8888
if err != nil {
8989
return pdu, readBytes, errors.Wrap(err, "unable to decode AddressPrefix")
9090
}
91-
pdu.Address = *addr
91+
pdu.Address = addr
9292
readBytes += len(pfxBytes)
9393

9494
return pdu, readBytes, nil

0 commit comments

Comments
 (0)