]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: xt_ipcomp: Use ntohs to ease sparse warning
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 20 Jan 2014 00:55:42 +0000 (01:55 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 19 Feb 2014 10:41:25 +0000 (11:41 +0100)
commit497862ad464932be4b8c7e466c8413ab9065bbd2
tree639fc1cc5dab83c490b5673d9db8f1dc2d5bf911
parent1d8ee2f43af1ea0766bd802e2bd959452b49ffae
netfilter: xt_ipcomp: Use ntohs to ease sparse warning

0-DAY kernel build testing backend reported:

sparse warnings: (new ones prefixed by >>)

 >> >> net/netfilter/xt_ipcomp.c:63:26: sparse: restricted __be16 degrades to integer
 >> >> net/netfilter/xt_ipcomp.c:63:26: sparse: cast to restricted __be32

Fix this by using ntohs without shifting.

Tested with: make C=1 CF=-D__CHECK_ENDIAN__

Signed-off-by: Fan Du <fan.du@windriver.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/xt_ipcomp.c