...
When the assignment of b
to a
is not intended, this the conditional block is now executed when a
is equal to b
:
...
When the assignment of y to x is not intended, this the conditional block is now should be executed only when x is equal to y, as in this compliant solution:
...
EXP45-EX3: Assignment can be used in a function argument or array index. In this compliant solution, the expression x = y
is used in a function argument:
Code Block | ||||
---|---|---|---|---|
| ||||
if (foo(x = y)) { /* ... */ } |
Risk Assessment
...