]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sched/sch_tbf.c
Merge current mainline tree into linux-omap tree
[linux-2.6-omap-h63xx.git] / net / sched / sch_tbf.c
index a2f93c09f3cc2490b5131df91659112b3fc10693..e22dfe85e43ed5e38213f3bf8d09449d699d43ca 100644 (file)
@@ -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: