Skip to content

Commit

Permalink
Make SetReply a Reflexive Operation (#1484)
Browse files Browse the repository at this point in the history
  • Loading branch information
askurydzin authored Nov 2, 2023
1 parent 8a3ef11 commit 24995b9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ func (dns *Msg) SetReply(request *Msg) *Msg {
}
dns.Rcode = RcodeSuccess
if len(request.Question) > 0 {
dns.Question = make([]Question, 1)
dns.Question[0] = request.Question[0]
dns.Question = []Question{request.Question[0]}
}
return dns
}
Expand Down

0 comments on commit 24995b9

Please sign in to comment.