Skip to content

Commit

Permalink
Improvement based on static analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
lietu committed Nov 22, 2019
1 parent d0bee17 commit b059f5f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions shared/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ func ReportSuccess(req *dns.Msg, res *dns.Msg, rtt time.Duration, server string)
name := q.Name

answerList := []dns.RR{}
for _, a := range res.Answer {
answerList = append(answerList, a)
}
answerList = append(answerList, res.Answer...)

// Sort A records first, then AAAA, then rest
sort.Slice(answerList[:], func(i, j int) bool {
Expand Down

0 comments on commit b059f5f

Please sign in to comment.