Don't declare variables after statements

This fixes building with compilers that are strict about the pre-C99
rule about having all variable declarations before statements.

Change-Id: I06dd0cc42a6dbe90025c3c913a0c8d9ffb0acbcb
10 files changed