signed_integer_overflow_check: if (foo + bar < foo) is undefined for signed
commit4a2b70d6d9c6d6f4f2794ce47c087b69f4527db9
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 15 Aug 2017 10:13:50 +0000 (15 13:13 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 15 Aug 2017 10:13:50 +0000 (15 13:13 +0300)
tree0cbb9ff6e1a59a7fdeb83bfa38cc4a91742a9358
parentf06d7deb52133c96d6744adb73722c636641a8fe
signed_integer_overflow_check: if (foo + bar < foo) is undefined for signed

If you try to use "if (foo + bar < foo)" then make sure that the addition
is done as unsigned.  I don't really know how this affects the kernel or
if it matters with the combination of gcc options we use.  But technically
it is incorrect code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_list.h
check_signed_integer_overflow_check.c [new file with mode: 0644]