summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_tbf.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2009-03-21 13:36:17 -0700
committerDavid S. Miller <davem@davemloft.net>2009-03-21 13:36:17 -0700
commita0bffffc148cd8e75a48a89ad2ddb74e4081a20a (patch)
tree3a4d350d65d88bb1df8906b4822af2350ceb1cfc /net/sched/sch_tbf.c
parenta3ac80a130300573de351083cf4a5b46d233e8bf (diff)
downloadlinux-a0bffffc148cd8e75a48a89ad2ddb74e4081a20a.tar.bz2
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/sch_tbf.c')
-rw-r--r--net/sched/sch_tbf.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
index a2f93c09f3cc..e22dfe85e43e 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)
struct tc_tbf_qopt *qopt;
struct qdisc_rate_table *rtab = NULL;
struct qdisc_rate_table *ptab = NULL;
- struct qdisc_rate_table *tmp;
struct Qdisc *child = NULL;
int max_size,n;
@@ -295,13 +294,9 @@ static int tbf_change(struct Qdisc* sch, struct nlattr *opt)
q->tokens = q->buffer;
q->ptokens = q->mtu;
- tmp = q->R_tab;
- q->R_tab = rtab;
- rtab = tmp;
+ swap(q->R_tab, rtab);
+ swap(q->P_tab, ptab);
- tmp = q->P_tab;
- q->P_tab = ptab;
- ptab = tmp;
sch_tree_unlock(sch);
err = 0;
done: