double_checking: allow if (foo) { ... } else if (!foo) { }
commit99c68f94ad11103bf68d74cecfa0638a7b7b3a3e
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 20 Aug 2015 17:06:05 +0000 (20 20:06 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 20 Aug 2015 17:06:05 +0000 (20 20:06 +0300)
tree02a8ada155c250859c626b02e8dd27346036d161
parent1c0fdef9f3da23f458a43688478b96b8d0e5aff9
double_checking: allow if (foo) { ... } else if (!foo) { }

Checking a known condition is often harmless and intentional.  For example:

if (foo && bar) {
...
} else { foo && !bar) {
...
} else {

The second check for "!bar" is not necessary, but it kind of makes the
code more readable.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_double_checking.c