Reduce scope of for-loop-local variables to avoid shadowing

Álvaro Herrera <alvherre@kurilemu.de>

Commit: cece37c9843c980b5be2f6d24c2b9cef1f9429a7
Author: Álvaro Herrera <alvherre@kurilemu.de>
Date: 2026-03-03T10:24:11Z
Reduce scope of for-loop-local variables to avoid shadowing

Adjust a couple of for-loops where a local variable was shadowed by
another in the same scope, by renaming it as well as reducing its scope
to the containing for-loop.

Author: Chao Li <lic@highgo.com>
Reviewed-by: Peter Smith <smithpb2250@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Discussion: https://postgr.es/m/CAEoWx2kQ2x5gMaj8tHLJ3=jfC+p5YXHkJyHrDTiQw2nn2FJTmQ@mail.gmail.com

Files

Discussion