Changed from standard if-then-else to ternary operator - more concise

Signed-off-by: Bob Page <pagerk@gmail.com>