buf_size: improve calloc() handling
commit02f6e1c4b8445ee6a0669cdece369ecc41e0d6db
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 18 Feb 2019 07:08:33 +0000 (18 10:08 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 18 Feb 2019 07:08:33 +0000 (18 10:08 +0300)
treeff501206af48073f7292c5254abf3b57e31557f7
parent1d05e46e2d7ed2c2b9a7c608c3ee32e7ea42e517
buf_size: improve calloc() handling

We sometimes know that "foo * bar < limit".  So when we're handling
calloc() then we can just change "foo = calloc(n, size);" to
"foo = alloc(n * size);" and it works slightly better.

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