TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - C Coding Standard
Search

SR:  7.14#1Checked automatically with code checker

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 */