smatch_clear_buffer: memcpy() should set the destination to unknown
commitf037c694630306a0a70bb922411119fe7bd9a5d9
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 11 Oct 2013 07:54:10 +0000 (11 10:54 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 11 Oct 2013 07:54:10 +0000 (11 10:54 +0300)
tree583e9065b263c446656455d7a9abf1aad994c876
parente341cd0c8a0e8275f42c4abb24076c976d2126e0
smatch_clear_buffer: memcpy() should set the destination to unknown

In the original code "memcpy(foo, bar, sizeof(foo))" was equivalent to
"foo.a = foo.a; foo.b = foo.b;".  Most of the time foo starts as
uninitialized so it's not a problem, but if it's initialized that doesn't
work.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_clear_buffer.c
smatch_expressions.c
smatch_extra.h