]> err.no Git - linux-2.6/blobdiff - net/sched/act_api.c
[IPV6]: Remove unused code in ndisc_send_redirect().
[linux-2.6] / net / sched / act_api.c
index 36022605fc162b1442b20f30c5aef78cd00aeaca..0b8eb235bc136fff1eeb349f72c549a5ce4df3df 100644 (file)
@@ -121,7 +121,7 @@ static int tcf_del_walker(struct sk_buff *skb, struct tc_action *a,
        nest = nla_nest_start(skb, a->order);
        if (nest == NULL)
                goto nla_put_failure;
-       NLA_PUT(skb, TCA_KIND, IFNAMSIZ, a->ops->kind);
+       NLA_PUT_STRING(skb, TCA_KIND, a->ops->kind);
        for (i = 0; i < (hinfo->hmask + 1); i++) {
                p = hinfo->htab[tcf_hash(i, hinfo->hmask)];
 
@@ -133,7 +133,7 @@ static int tcf_del_walker(struct sk_buff *skb, struct tc_action *a,
                        p = s_p;
                }
        }
-       NLA_PUT(skb, TCA_FCNT, 4, &n_i);
+       NLA_PUT_U32(skb, TCA_FCNT, n_i);
        nla_nest_end(skb, nest);
 
        return n_i;
@@ -423,7 +423,7 @@ tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
        if (a->ops == NULL || a->ops->dump == NULL)
                return err;
 
-       NLA_PUT(skb, TCA_KIND, IFNAMSIZ, a->ops->kind);
+       NLA_PUT_STRING(skb, TCA_KIND, a->ops->kind);
        if (tcf_action_copy_stats(skb, a, 0))
                goto nla_put_failure;
        nest = nla_nest_start(skb, TCA_OPTIONS);
@@ -690,7 +690,7 @@ tcf_action_get_1(struct nlattr *nla, struct nlmsghdr *n, u32 pid)
        if (tb[TCA_ACT_INDEX] == NULL ||
            nla_len(tb[TCA_ACT_INDEX]) < sizeof(index))
                goto err_out;
-       index = *(int *)nla_data(tb[TCA_ACT_INDEX]);
+       index = nla_get_u32(tb[TCA_ACT_INDEX]);
 
        err = -ENOMEM;
        a = kzalloc(sizeof(struct tc_action), GFP_KERNEL);