check_overflow: relax rules on if (ptr < &array[max]) a bit
commit83ef7b79e3a2c4d52ee9ab0df0350cabe320dc37
authorDan Carpenter <error27@gmail.com>
Tue, 2 Mar 2010 20:15:22 +0000 (2 23:15 +0300)
committerDan Carpenter <error27@gmail.com>
Tue, 2 Mar 2010 20:15:22 +0000 (2 23:15 +0300)
treecd23852a33cc024a5c96ba46459ef52483e4ff53
parentdcfe05bad53b3f9ca05dc9b20f0ef07767c76472
check_overflow:  relax rules on if (ptr < &array[max]) a bit

The old code would allow while (ptr < &array[ARRAY_SIZE(array)]) { ...
but it would complain if you first assigned the max = ARRAY_SIZE(array)
and the did while (ptr < &array[max]) { ...

Signed-off-by: Dan Carpenter <error27@gmail.com>
check_overflow.c