Simplify conditionals

Ternary conditionals are evil in C. No less evil here :)
Merge pull request #50 from alanjds/patch-1

Simplify conditionals