google / seesaw

Seesaw v2 is a Linux Virtual Server (LVS) based load balancing platform.
Apache License 2.0
5.63k stars 511 forks source link

engine/config: break loop, not switch #64

Closed DrJosh9000 closed 4 years ago

DrJosh9000 commented 4 years ago

This break statement was breaking the switch at the end of a case, which has no effect. The loop assigns priority values to the first two nodes, and does nothing to any remaining nodes. Therefore it may as well break the loop and not just the switch.

liuyuan10 commented 4 years ago

@DrJosh9000 do you still want to merge this change or we can close this PR? While I don't see how helpful it is it doesn't hurt to merge it either.

DrJosh9000 commented 4 years ago

I want to do something, because the current code is misleading, and also to make the linter warning that pointed this out to me originally to go away. If nobody objects then I'll merge.

liuyuan10 commented 4 years ago

sure. let's merge it