Remove duplicate ifs, in if/else chains in case that the expression is duplicated. It can happen in copy/paste cases.

Fixes formatting of the previous commit to match K&R style.