Simplify ternary construction

Change-Id: I17872a978a5a788f10811153ea2ac9a4ef0f1f6d
Merge "Simplify ternary construction"