Merge some conditions

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Further simplify previous patch

No functional change.