Code style of conditional assignment improved