constraints: handle conditions like "if (8 < x) {"
commita88c129e1415ff6171ea3e694ad9db6b070209fc
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 25 Jan 2018 14:26:21 +0000 (25 17:26 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 25 Jan 2018 14:26:21 +0000 (25 17:26 +0300)
tree119a3d034199e1a7e03972795ca36d22ad64a962
parent32688ff4ca6b2d3f5b39eab69c1cfe91b0fca26a
constraints: handle conditions like "if (8 < x) {"

All right thinking people write code with the variable on the left and the
limit on the right.  That's how people talk in English.  Maybe in other
languages people say "if the limit is less than the variable"?  Who knows.

Anyway, I sometimes like to ignore wrong headed code, but I always have to
go back and change it to handle flipped logic as well and that's what this
patch does.

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