mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 00:04:15 -04:00
fix: remove unnecessary conversion (#6258)
Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user