Skip to content

Commit

Permalink
remove unpackCompressed method
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz834 authored Nov 7, 2023
1 parent 364ec12 commit e0993e9
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 @@ -2018,10 +2018,6 @@ func (n *Name) pack(msg []byte, compression map[string]int, compressionOff int)

// 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 @@ -2536,7 +2532,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 e0993e9

Please sign in to comment.