Fix a cppcheck compilation warning
Warning was "Identical inner 'if' condition is always true". The while check can also be removed because of the break.
Warning was "Identical inner 'if' condition is always true". The while check can also be removed because of the break.