constraints_required: improve handling of assigned sizes
commit2afcffd1b1faa83061dd4d2a39087ae716e8c8e1
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 11 Jan 2018 13:32:08 +0000 (11 16:32 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 11 Jan 2018 13:32:08 +0000 (11 16:32 +0300)
tree9fdef577276a642f998589fc2a8f14be274a4772
parent4fec46bbec9f30a0466c0c85a2e3fb840dc59153
constraints_required: improve handling of assigned sizes

This is tricky because I'm trying to remember what was going on before
Christmas.  It has to do with code like this:

size = num * sizeof(*foo);
p = alloc(size);

What this code does is it uses both "num * sizeof(*foo)" and "size" as
the size.  I'm not sure why we would want to do that, but presumably there
was a reason.

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