aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-11-20 04:54:27 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-20 04:54:27 -0500
commit21d1a161f6b1fff154e3614a6b5a2111fa7a4191 (patch)
treedac48eb0f355ec46e565577c43efa7cb9c8f8fb1 /net/ipv4
parent00b5e50549aa9da770f1161907b4ed68aa4ece3a (diff)
net: ip_sockglue.c add static, annotate ports' endianness
Fixes sparse warnings: net/ipv4/ip_sockglue.c:146:15: warning: incorrect type in assignment (different base types) net/ipv4/ip_sockglue.c:146:15: expected restricted __be16 [assigned] [usertype] sin_port net/ipv4/ip_sockglue.c:146:15: got unsigned short [unsigned] [short] [usertype] <noident> net/ipv4/ip_sockglue.c:130:6: warning: symbol 'ip_cmsg_recv_dstaddr' was not declared. Should it be static? Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/ip_sockglue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index 624b534201e2..43c05854d752 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -127,11 +127,11 @@ static void ip_cmsg_recv_security(struct msghdr *msg, struct sk_buff *skb)
127 security_release_secctx(secdata, seclen); 127 security_release_secctx(secdata, seclen);
128} 128}
129 129
130void ip_cmsg_recv_dstaddr(struct msghdr *msg, struct sk_buff *skb) 130static void ip_cmsg_recv_dstaddr(struct msghdr *msg, struct sk_buff *skb)
131{ 131{
132 struct sockaddr_in sin; 132 struct sockaddr_in sin;
133 struct iphdr *iph = ip_hdr(skb); 133 struct iphdr *iph = ip_hdr(skb);
134 u16 *ports = (u16 *) skb_transport_header(skb); 134 __be16 *ports = (__be16 *)skb_transport_header(skb);
135 135
136 if (skb_transport_offset(skb) + 4 > skb->len) 136 if (skb_transport_offset(skb) + 4 > skb->len)
137 return; 137 return;