net_sched: use __TCA_HTB_MAX and TCA_HTB_MAX
authorChangli Gao <xiaosuo@gmail.com>
Thu, 30 Sep 2010 06:17:44 +0000 (06:17 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 9 Oct 2010 16:22:53 +0000 (09:22 -0700)
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_htb.c

index 4be8d04b262d18963ac6617abaaeefc5151e16f5..87d944941867bca18149838e17ca68bf68f615ee 100644 (file)
@@ -1302,14 +1302,14 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
        struct htb_class *cl = (struct htb_class *)*arg, *parent;
        struct nlattr *opt = tca[TCA_OPTIONS];
        struct qdisc_rate_table *rtab = NULL, *ctab = NULL;
-       struct nlattr *tb[TCA_HTB_RTAB + 1];
+       struct nlattr *tb[__TCA_HTB_MAX];
        struct tc_htb_opt *hopt;
 
        /* extract all subattrs from opt attr */
        if (!opt)
                goto failure;
 
-       err = nla_parse_nested(tb, TCA_HTB_RTAB, opt, htb_policy);
+       err = nla_parse_nested(tb, TCA_HTB_MAX, opt, htb_policy);
        if (err < 0)
                goto failure;