diff options
author | Jianjun Kong <jianjun@zeuux.org> | 2008-11-03 03:23:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-03 03:23:42 -0500 |
commit | d9319100c1ad7d0ed4045ded767684ad25670436 (patch) | |
tree | 98ab9f9f9bf353d26e8a8f78d1edfeba2957d2ea | |
parent | e0db4a786bbd73145b4feb45c75d49b6e60fe72c (diff) |
net: clean up net/ipv4/ah4.c esp4.c fib_semantics.c inet_connection_sock.c inetpeer.c ip_output.c
Signed-off-by: Jianjun Kong <jianjun@zeuux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/ah4.c | 4 | ||||
-rw-r--r-- | net/ipv4/esp4.c | 4 | ||||
-rw-r--r-- | net/ipv4/fib_semantics.c | 8 | ||||
-rw-r--r-- | net/ipv4/inet_connection_sock.c | 2 | ||||
-rw-r--r-- | net/ipv4/inetpeer.c | 2 | ||||
-rw-r--r-- | net/ipv4/ip_output.c | 6 |
6 files changed, 13 insertions, 13 deletions
diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c index 8219b7e0968d..3f205181712d 100644 --- a/net/ipv4/ah4.c +++ b/net/ipv4/ah4.c | |||
@@ -201,8 +201,8 @@ out: | |||
201 | 201 | ||
202 | static void ah4_err(struct sk_buff *skb, u32 info) | 202 | static void ah4_err(struct sk_buff *skb, u32 info) |
203 | { | 203 | { |
204 | struct iphdr *iph = (struct iphdr*)skb->data; | 204 | struct iphdr *iph = (struct iphdr *)skb->data; |
205 | struct ip_auth_hdr *ah = (struct ip_auth_hdr*)(skb->data+(iph->ihl<<2)); | 205 | struct ip_auth_hdr *ah = (struct ip_auth_hdr *)(skb->data+(iph->ihl<<2)); |
206 | struct xfrm_state *x; | 206 | struct xfrm_state *x; |
207 | 207 | ||
208 | if (icmp_hdr(skb)->type != ICMP_DEST_UNREACH || | 208 | if (icmp_hdr(skb)->type != ICMP_DEST_UNREACH || |
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index 21515d4c49eb..95a9c65003f8 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c | |||
@@ -413,8 +413,8 @@ static u32 esp4_get_mtu(struct xfrm_state *x, int mtu) | |||
413 | 413 | ||
414 | static void esp4_err(struct sk_buff *skb, u32 info) | 414 | static void esp4_err(struct sk_buff *skb, u32 info) |
415 | { | 415 | { |
416 | struct iphdr *iph = (struct iphdr*)skb->data; | 416 | struct iphdr *iph = (struct iphdr *)skb->data; |
417 | struct ip_esp_hdr *esph = (struct ip_esp_hdr*)(skb->data+(iph->ihl<<2)); | 417 | struct ip_esp_hdr *esph = (struct ip_esp_hdr *)(skb->data+(iph->ihl<<2)); |
418 | struct xfrm_state *x; | 418 | struct xfrm_state *x; |
419 | 419 | ||
420 | if (icmp_hdr(skb)->type != ICMP_DEST_UNREACH || | 420 | if (icmp_hdr(skb)->type != ICMP_DEST_UNREACH || |
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index ded2ae34eab1..4817dea3bc73 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c | |||
@@ -63,16 +63,16 @@ static DEFINE_SPINLOCK(fib_multipath_lock); | |||
63 | for (nhsel=0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++) | 63 | for (nhsel=0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++) |
64 | 64 | ||
65 | #define change_nexthops(fi) { int nhsel; struct fib_nh * nh; \ | 65 | #define change_nexthops(fi) { int nhsel; struct fib_nh * nh; \ |
66 | for (nhsel=0, nh = (struct fib_nh*)((fi)->fib_nh); nhsel < (fi)->fib_nhs; nh++, nhsel++) | 66 | for (nhsel=0, nh = (struct fib_nh *)((fi)->fib_nh); nhsel < (fi)->fib_nhs; nh++, nhsel++) |
67 | 67 | ||
68 | #else /* CONFIG_IP_ROUTE_MULTIPATH */ | 68 | #else /* CONFIG_IP_ROUTE_MULTIPATH */ |
69 | 69 | ||
70 | /* Hope, that gcc will optimize it to get rid of dummy loop */ | 70 | /* Hope, that gcc will optimize it to get rid of dummy loop */ |
71 | 71 | ||
72 | #define for_nexthops(fi) { int nhsel=0; const struct fib_nh * nh = (fi)->fib_nh; \ | 72 | #define for_nexthops(fi) { int nhsel = 0; const struct fib_nh * nh = (fi)->fib_nh; \ |
73 | for (nhsel=0; nhsel < 1; nhsel++) | 73 | for (nhsel=0; nhsel < 1; nhsel++) |
74 | 74 | ||
75 | #define change_nexthops(fi) { int nhsel=0; struct fib_nh * nh = (struct fib_nh*)((fi)->fib_nh); \ | 75 | #define change_nexthops(fi) { int nhsel = 0; struct fib_nh * nh = (struct fib_nh *)((fi)->fib_nh); \ |
76 | for (nhsel=0; nhsel < 1; nhsel++) | 76 | for (nhsel=0; nhsel < 1; nhsel++) |
77 | 77 | ||
78 | #endif /* CONFIG_IP_ROUTE_MULTIPATH */ | 78 | #endif /* CONFIG_IP_ROUTE_MULTIPATH */ |
@@ -358,7 +358,7 @@ int fib_detect_death(struct fib_info *fi, int order, | |||
358 | state = n->nud_state; | 358 | state = n->nud_state; |
359 | neigh_release(n); | 359 | neigh_release(n); |
360 | } | 360 | } |
361 | if (state==NUD_REACHABLE) | 361 | if (state == NUD_REACHABLE) |
362 | return 0; | 362 | return 0; |
363 | if ((state&NUD_VALID) && order != dflt) | 363 | if ((state&NUD_VALID) && order != dflt) |
364 | return 0; | 364 | return 0; |
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index bd1278a2d828..36f4cbc7da3a 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c | |||
@@ -323,7 +323,7 @@ void inet_csk_reset_keepalive_timer(struct sock *sk, unsigned long len) | |||
323 | 323 | ||
324 | EXPORT_SYMBOL(inet_csk_reset_keepalive_timer); | 324 | EXPORT_SYMBOL(inet_csk_reset_keepalive_timer); |
325 | 325 | ||
326 | struct dst_entry* inet_csk_route_req(struct sock *sk, | 326 | struct dst_entry *inet_csk_route_req(struct sock *sk, |
327 | const struct request_sock *req) | 327 | const struct request_sock *req) |
328 | { | 328 | { |
329 | struct rtable *rt; | 329 | struct rtable *rt; |
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c index a456ceeac3f2..b1fbe18feb5a 100644 --- a/net/ipv4/inetpeer.c +++ b/net/ipv4/inetpeer.c | |||
@@ -144,7 +144,7 @@ static void unlink_from_unused(struct inet_peer *p) | |||
144 | * _stack is known to be NULL or not at compile time, | 144 | * _stack is known to be NULL or not at compile time, |
145 | * so compiler will optimize the if (_stack) tests. | 145 | * so compiler will optimize the if (_stack) tests. |
146 | */ | 146 | */ |
147 | #define lookup(_daddr,_stack) \ | 147 | #define lookup(_daddr, _stack) \ |
148 | ({ \ | 148 | ({ \ |
149 | struct inet_peer *u, **v; \ | 149 | struct inet_peer *u, **v; \ |
150 | if (_stack != NULL) { \ | 150 | if (_stack != NULL) { \ |
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index d2a8f8bb78a6..46d7be233eac 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -430,7 +430,7 @@ static void ip_copy_metadata(struct sk_buff *to, struct sk_buff *from) | |||
430 | * single device frame, and queue such a frame for sending. | 430 | * single device frame, and queue such a frame for sending. |
431 | */ | 431 | */ |
432 | 432 | ||
433 | int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff*)) | 433 | int ip_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) |
434 | { | 434 | { |
435 | struct iphdr *iph; | 435 | struct iphdr *iph; |
436 | int raw = 0; | 436 | int raw = 0; |
@@ -720,7 +720,7 @@ static inline int ip_ufo_append_data(struct sock *sk, | |||
720 | int getfrag(void *from, char *to, int offset, int len, | 720 | int getfrag(void *from, char *to, int offset, int len, |
721 | int odd, struct sk_buff *skb), | 721 | int odd, struct sk_buff *skb), |
722 | void *from, int length, int hh_len, int fragheaderlen, | 722 | void *from, int length, int hh_len, int fragheaderlen, |
723 | int transhdrlen, int mtu,unsigned int flags) | 723 | int transhdrlen, int mtu, unsigned int flags) |
724 | { | 724 | { |
725 | struct sk_buff *skb; | 725 | struct sk_buff *skb; |
726 | int err; | 726 | int err; |
@@ -741,7 +741,7 @@ static inline int ip_ufo_append_data(struct sock *sk, | |||
741 | skb_reserve(skb, hh_len); | 741 | skb_reserve(skb, hh_len); |
742 | 742 | ||
743 | /* create space for UDP/IP header */ | 743 | /* create space for UDP/IP header */ |
744 | skb_put(skb,fragheaderlen + transhdrlen); | 744 | skb_put(skb, fragheaderlen + transhdrlen); |
745 | 745 | ||
746 | /* initialize network header pointer */ | 746 | /* initialize network header pointer */ |
747 | skb_reset_network_header(skb); | 747 | skb_reset_network_header(skb); |