Skip to content

Commit

Permalink
remove unpackCompressed method
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz834 committed Feb 2, 2024
1 parent c621db3 commit 88d2e06
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions dns/dnsmessage/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -2027,10 +2027,6 @@ func (n *Name) pack(msg []byte, compression map[string]uint16, compressionOff in

// unpack unpacks a domain name.
func (n *Name) unpack(msg []byte, off int) (int, error) {
return n.unpackCompressed(msg, off)
}

func (n *Name) unpackCompressed(msg []byte, off int) (int, error) {
// currOff is the current working offset.
currOff := off

Expand Down Expand Up @@ -2545,7 +2541,7 @@ func unpackSRVResource(msg []byte, off int) (SRVResource, error) {
return SRVResource{}, &nestedError{"Port", err}
}
var target Name
if _, err := target.unpackCompressed(msg, off); err != nil {
if _, err := target.unpack(msg, off); err != nil {
return SRVResource{}, &nestedError{"Target", err}
}
return SRVResource{priority, weight, port, target}, nil
Expand Down

0 comments on commit 88d2e06

Please sign in to comment.