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/sched | |
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/sched')
-rw-r--r-- | net/sched/sch_tbf.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c index a2f93c09f3c..e22dfe85e43 100644 --- a/net/sched/sch_tbf.c +++ b/net/sched/sch_tbf.c | |||
@@ -236,7 +236,6 @@ static int tbf_change(struct Qdisc* sch, struct nlattr *opt) | |||
236 | struct tc_tbf_qopt *qopt; | 236 | struct tc_tbf_qopt *qopt; |
237 | struct qdisc_rate_table *rtab = NULL; | 237 | struct qdisc_rate_table *rtab = NULL; |
238 | struct qdisc_rate_table *ptab = NULL; | 238 | struct qdisc_rate_table *ptab = NULL; |
239 | struct qdisc_rate_table *tmp; | ||
240 | struct Qdisc *child = NULL; | 239 | struct Qdisc *child = NULL; |
241 | int max_size,n; | 240 | int max_size,n; |
242 | 241 | ||
@@ -295,13 +294,9 @@ static int tbf_change(struct Qdisc* sch, struct nlattr *opt) | |||
295 | q->tokens = q->buffer; | 294 | q->tokens = q->buffer; |
296 | q->ptokens = q->mtu; | 295 | q->ptokens = q->mtu; |
297 | 296 | ||
298 | tmp = q->R_tab; | 297 | swap(q->R_tab, rtab); |
299 | q->R_tab = rtab; | 298 | swap(q->P_tab, ptab); |
300 | rtab = tmp; | ||
301 | 299 | ||
302 | tmp = q->P_tab; | ||
303 | q->P_tab = ptab; | ||
304 | ptab = tmp; | ||
305 | sch_tree_unlock(sch); | 300 | sch_tree_unlock(sch); |
306 | err = 0; | 301 | err = 0; |
307 | done: | 302 | done: |