Reuse the same variable

This commit is contained in:
Frank Denis 2019-12-16 16:32:49 +01:00
parent 66799c4159
commit 2d25719a69
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ func (patternMatcher *PatternMatcher) Eval(qName string) (reject bool, reason st
revQname := StringReverse(qName)
if match, xval, found := patternMatcher.blockedSuffixes.LongestPrefix([]byte(revQname)); found {
if len(match) == len(qName) || revQname[len(match)] == '.' {
if len(match) == len(revQname) || revQname[len(match)] == '.' {
return true, "*." + StringReverse(string(match)), xval
}
if len(match) < len(revQname) && len(revQname) > 0 {