buf_size, db: if a struct member size is set in the file that's the size
commitb559af50c03b0ca5ae304ac6f4b68a8e42a70ec5
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 11 Sep 2012 13:46:07 +0000 (11 16:46 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 11 Sep 2012 13:46:07 +0000 (11 16:46 +0300)
treec7eac68df11a2e2cda66b88f211b700decda9183
parent72174b5c4bf53b830d71ae04d042722cdab3e1a2
buf_size, db: if a struct member size is set in the file that's the size

The original Smatch code handled the situation where a buffer which is a
struct member is only allocated once in the entire kernel.

However that situation is pretty rare.  On the other hand, it's pretty
common that you have a struct member which has only one size with in a
particular file.  This patch tries to handle those cases.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_buf_size.c
smatch_scripts/db/fill_db_type_size.pl
smatch_scripts/db/type_size.schema