Assignment in condition should be parenthesized, when used in a conditional operator. Otherwise there can be issues with precedence, as assignment is the operator with least precedence. Consider putting assignment in condition in round braces.
int x = 10;
if (x = x * 2 > 20) { // This will assign x as false, not x * 2
// ..
}
int x = 10;
if ((x = x * 2) > 20) {
// ..
}