pointer_math: check ALIGN() macro math
commit5e36f9ac8ae6088603d0a91270e487abbfd8b6c8
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 17 Jul 2012 07:20:05 +0000 (17 10:20 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 17 Jul 2012 07:20:05 +0000 (17 10:20 +0300)
tree1c746d89338fbe85785ac56698fe16c60c1a0979
parentb19f8f1ded3ba5a062ebda5e2c3bd064b0bc8bc1
pointer_math: check ALIGN() macro math

The old code was only checking for "p + sizeof(foo)" but really there are
other things besides sizeof() which return the size in bytes.  For example,
the ALIGN() macro does.  Also we could say "size = sizeof(foo);" and then
size is in bytes.

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