Refactor one-time do-while(0) loop and single (!) break check.