kernel, db: consider x = htonl(10) and x = 10 equivalent.
commit7606a115769d169d3a8975a5387c267f3f174435
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 19 Dec 2013 11:06:33 +0000 (19 14:06 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 19 Dec 2013 11:06:33 +0000 (19 14:06 +0300)
tree21bcb90552c5227011d996b328d5b4be2e493d92
parent740ac0ad349551f3af31df78b543cc4a7b6ac175
kernel, db: consider x = htonl(10) and x = 10 equivalent.

Smatch considers network endian data as untrusted.  But there are some
cases where we do:

foo.size = htonl(sizeof(msg));
frob(ntohl(foo.size));

In this case we actually know the value of ntohl(foo.size).

Pretending endian data is always CPU endian is ok because Sparse will warn
if we using endian data for math.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_data/db/fixup_kernel.sh
smatch_data/kernel.no_inline_functions [new file with mode: 0644]