Minor refactoring to avoid GNU ?: ternary