buf_size: fix what caller_info to pass and what is assumed
commit48855a36872e62d517eb058e8497ee07e99ad676
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 2 Nov 2020 18:56:54 +0000 (2 21:56 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 2 Nov 2020 18:56:54 +0000 (2 21:56 +0300)
tree0a08e59c480a1086965f4ce2f00e34f81984a7cd
parentbc26942235efdd58cea31d468763b88a399559b1
buf_size: fix what caller_info to pass and what is assumed

Generally if a function takes a pointer to an unsigned long, then we
assume that the caller is going to pass a pointer to one and only one
unsigned long.  But if it passes and array of longs, then record the
BUF_SIZE for that.

The original code looked at the type of the variable you were passing but
it should look at the type of the argument that the function takes.

Also originally this code only applied to struct pointers but it should
apply to everything.

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