mirror of
https://github.com/coredns/coredns.git
synced 2026-05-25 11:20:23 -04:00
Remove redundant code (#8072)
Signed-off-by: Yang Jun <yang.jun22@zte.com.cn> Signed-off-by: 杨军10092085 <yang.jun22@zte.com.cn>
This commit is contained in:
@@ -168,11 +168,6 @@ func (z *Zone) Lookup(ctx context.Context, state request.Request, qname string)
|
||||
i++
|
||||
}
|
||||
|
||||
// What does found and !shot mean - do we ever hit it?
|
||||
if found && !shot {
|
||||
return nil, nil, nil, ServerFailure
|
||||
}
|
||||
|
||||
// Found entire name.
|
||||
if found && shot {
|
||||
if rrs := elem.Type(dns.TypeCNAME); len(rrs) > 0 && qtype != dns.TypeCNAME {
|
||||
|
||||
@@ -371,10 +371,7 @@ func parseAnswerRules(name string, args []string) (auto bool, rules ResponseRule
|
||||
}
|
||||
for arg < len(args) {
|
||||
if last == "" && args[arg] != AnswerMatch {
|
||||
if last == "" {
|
||||
return false, nil, fmt.Errorf("exceeded the number of arguments for a non-answer rule argument for %s rule", name)
|
||||
}
|
||||
return false, nil, fmt.Errorf("exceeded the number of arguments for %s answer rule for %s rule", last, name)
|
||||
return false, nil, fmt.Errorf("exceeded the number of arguments for a non-answer rule argument for %s rule", name)
|
||||
}
|
||||
if args[arg] == AnswerMatch {
|
||||
arg++
|
||||
|
||||
Reference in New Issue
Block a user