fix: remove unnecessary conversion (#6258)

Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
This commit is contained in:
Zhizhen He
2023-08-14 21:14:09 +08:00
committed by GitHub
parent 141c760846
commit 5de473da1c
15 changed files with 20 additions and 19 deletions

View File

@@ -199,7 +199,7 @@ func (w *weightedRR) topAddressIndex(address []dns.RR) int {
for _, wa := range weightedAddr {
psum += uint(wa.weight)
if v < psum {
return int(wa.index)
return wa.index
}
}