Permalink
Browse files

change for loop

  • Loading branch information...
1 parent a1ead70 commit 3a1cb727ddef772b9554b2ea0999659c140687f6 @smallnest committed Dec 5, 2016
Showing with 1 addition and 3 deletions.
  1. +1 −3 weighted2.go
View
@@ -65,7 +65,7 @@ func (w *W2) Next() interface{} {
return w.servers[0].Server
}
- for true {
+ for {
w.i = (w.i + 1) % w.n
if w.i == 0 {
w.cw = w.cw - w.gcd
@@ -81,8 +81,6 @@ func (w *W2) Next() interface{} {
return w.servers[w.i].Server
}
}
-
- return true
}
func gcd(x, y int) int {

0 comments on commit 3a1cb72

Please sign in to comment.