Remove nested if statement

The nested if statement is not necessary and just adds extra
indentation. Remove it by moving the expression from the inner if
statement to the outer.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>