buf_size: arrays cannot be re-assigned
commit6bdfb530f6e01cf84b1a23e0c8bb1dd984fafb73
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 22 Aug 2015 09:48:32 +0000 (22 12:48 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Sat, 22 Aug 2015 09:48:32 +0000 (22 12:48 +0300)
tree80a414381920c407c4c4936f8987e50f0aa33f1a
parentd21f7e62b34e5d49f9536a94a4f9d5460c969d40
buf_size: arrays cannot be re-assigned

I think the original purpose behind this code was that you had something
like:

int buf[10];
int *p = &buf;

if (size > ARRAY_SIZE(buf))
p = kmalloc(sizeof(*p) * size, GFP_KERNEL);

But in that code we are using a pointer and not an array.  Arrays can't be
re-assigned, so this code is nonsense.  Delete.

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