buf_size: fix type_bytes()
commita6524ba1ac8cecd67529cf88570edbc245cf65a8
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 10 Feb 2017 13:44:43 +0000 (10 16:44 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 10 Feb 2017 13:44:43 +0000 (10 16:44 +0300)
tree2ef931cb21bf10caae9afc08ded28f9778979757
parent11ade184564f57838c79e0b654cc160eee8254c6
buf_size: fix type_bytes()

Ugh...  I'm not totally sure this is correct.  It seems to work but I can't
swear that I haven't missed something.

Anyway, this patch fixes commit 1ce2e2a68fe9 ("type: fix type_bits() for
arrays.  The problem is if you pass an array to a function then you want
to say that the array is a pointer in the valid range.  But if you want
to get the size of the array then maybe you want the whole size...  I've
introduced a array_size() to give you that.

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