Renames "seen" to "resolved".

This commit is contained in:
James Phillips 2016-08-11 22:01:23 -07:00
parent 34d6c2d5e1
commit e30b99cef5
No known key found for this signature in database
GPG Key ID: 77183E682AC5FC11
1 changed files with 3 additions and 3 deletions

View File

@ -512,8 +512,8 @@ func indexRRs(rrs []dns.RR) map[string]dns.RR {
// only used to provide info for SRV records. If that's not the case, then this // only used to provide info for SRV records. If that's not the case, then this
// will wipe out any additional data. // will wipe out any additional data.
func syncExtra(index map[string]dns.RR, resp *dns.Msg) { func syncExtra(index map[string]dns.RR, resp *dns.Msg) {
seen := make(map[string]struct{}, len(resp.Answer))
extra := make([]dns.RR, 0, len(resp.Answer)) extra := make([]dns.RR, 0, len(resp.Answer))
resolved := make(map[string]struct{}, len(resp.Answer))
for _, ansRR := range resp.Answer { for _, ansRR := range resp.Answer {
srv, ok := ansRR.(*dns.SRV) srv, ok := ansRR.(*dns.SRV)
if !ok { if !ok {
@ -522,10 +522,10 @@ func syncExtra(index map[string]dns.RR, resp *dns.Msg) {
target := srv.Target target := srv.Target
RESOLVE: RESOLVE:
if _, ok := seen[target]; ok { if _, ok := resolved[target]; ok {
continue continue
} }
seen[target] = struct{}{} resolved[target] = struct{}{}
extraRR, ok := index[target] extraRR, ok := index[target]
if ok { if ok {