buf_comparison: record if we pass an ARRAY_SIZE to the function
commitc419bcb818933eb9832a85d67f8f3f446f08bff3
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 8 May 2017 08:37:50 +0000 (8 11:37 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 8 May 2017 08:37:50 +0000 (8 11:37 +0300)
treefcf2bb71a6f52159316c4ad52781c219782d59ca
parent276a14f027cd200fc4dd511a1fe89d95d97ec106
buf_comparison: record if we pass an ARRAY_SIZE to the function

It's pretty common to do:

whatever_func(array, ARRAY_SIZE(array));

Record this so we can complain about off by one bugs.  Also the merge
hook needs to be better.  If every caller passes and the same array size
then just store it as one link.

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