diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2009-03-21 16:36:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-21 16:36:17 -0400 |
commit | a0bffffc148cd8e75a48a89ad2ddb74e4081a20a (patch) | |
tree | 3a4d350d65d88bb1df8906b4822af2350ceb1cfc /net/decnet | |
parent | a3ac80a130300573de351083cf4a5b46d233e8bf (diff) |
net/*: use linux/kernel.h swap()
tcp_sack_swap seems unnecessary so I pushed swap to the caller.
Also removed comment that seemed then pointless, and added include
when not already there. Compile tested.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet')
-rw-r--r-- | net/decnet/dn_route.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 5130dee0b384..0cc4394117df 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -380,7 +380,6 @@ static int dn_return_short(struct sk_buff *skb) | |||
380 | unsigned char *ptr; | 380 | unsigned char *ptr; |
381 | __le16 *src; | 381 | __le16 *src; |
382 | __le16 *dst; | 382 | __le16 *dst; |
383 | __le16 tmp; | ||
384 | 383 | ||
385 | /* Add back headers */ | 384 | /* Add back headers */ |
386 | skb_push(skb, skb->data - skb_network_header(skb)); | 385 | skb_push(skb, skb->data - skb_network_header(skb)); |
@@ -399,10 +398,7 @@ static int dn_return_short(struct sk_buff *skb) | |||
399 | ptr += 2; | 398 | ptr += 2; |
400 | *ptr = 0; /* Zero hop count */ | 399 | *ptr = 0; /* Zero hop count */ |
401 | 400 | ||
402 | /* Swap source and destination */ | 401 | swap(*src, *dst); |
403 | tmp = *src; | ||
404 | *src = *dst; | ||
405 | *dst = tmp; | ||
406 | 402 | ||
407 | skb->pkt_type = PACKET_OUTGOING; | 403 | skb->pkt_type = PACKET_OUTGOING; |
408 | dn_rt_finish_output(skb, NULL, NULL); | 404 | dn_rt_finish_output(skb, NULL, NULL); |