comparison: inherit links when the comparison is set from a function call
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 29 Jun 2013 09:16:05 +0000 (12:16 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Sat, 29 Jun 2013 09:16:05 +0000 (12:16 +0300)
commitb5f1235755edf6be2e7405779d772ce4d181ae1f
tree13975535631348ef93b3e249a845c7c8b83ac932
parent469cd7f7fcfe1365183f17c1f150848b2b95050e
comparison: inherit links when the comparison is set from a function call

If you have:

a = b;

Then a inherits all the links from b.  If you have:

if (a < b) {

Then if you know "b < c" then you know that "a < c".  The problem here is
that we are doing:

a = strnlen(foo, b);

At the end we know that "a <= b" so if "b < c" then "a < c".  It's slightly
different from copying all the links or form the condition.

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