extra: handle binop comparisons better
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 6 Jul 2013 08:26:39 +0000 (11:26 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Sat, 6 Jul 2013 08:26:39 +0000 (11:26 +0300)
commitc5ed36386e0f6ee08bf8e52638ac68c9becfdd2b
treeaa5b5ef8863835d9944f45cc97c50ecd23839127
parentc9be20a01c7ffe2655fd660592866ddcc965572f
extra: handle binop comparisons better

This probably doesn't make such a big difference, but it does silence a
kernel false positive.  If you have an binop with implied values then move
them to the same side:

size = sizeof(struct foo)
if (x - 2 > size) {

The size of "x" at the end should be known.

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