Simplify the 0-padding for loop.