[code style] removed redundant local variable assignments before return

(I kept those instances where the local variable's name helped to understand the code).