Synopsis: | The right-hand operand of the logical AND operator shall not contain any side-effects because it is conditionally executed. |
Language: | C |
Severity Level: | 7 |
Category: | EXPRESSIONS |
Description: |
It is clearer to use an if statement to make the conditional execution explicit.
Example: if ( (a > b ) && i++ ) /* WRONG, i not always changed */ |