It's not logically equivalent as in the first case, once success is set to false it can never revert back to true and in your modified code, once it is set to false it can possibly revert back to true later in the "loop". Anyways, I appreciate the pull request but I won't merge this for now.