e3e81db
Simplify program flow: change while loops to for Reviewed by: rmeggins (cherry picked from commit 26739f7cc97318a0b19fca6a0ede66b4faa5f677)