db/comparison: Use mask information to get comparisons
commit39ac477896370d324f1f73bdf498f7fc6e5d3ac1
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 16 Feb 2018 12:48:04 +0000 (16 15:48 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 16 Feb 2018 12:48:04 +0000 (16 15:48 +0300)
tree053ab70076e2903f187f6f90145fa581c7b11d38
parent212a4fba20be97d2e6af3f19f3fcdd754469e4e2
db/comparison: Use mask information to get comparisons

Say you have something like:

unsigned int frob(unsigned int val, unsigned int mask)
{
return val & mask;
}

Then you know that the return value is going to be <= mask.  Also it's
going to be <= val but the idiomatic way is to put the mask after the
variable.

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