[NET_SCHED]: Use typeful attribute parsing helpers
[deliverable/linux.git] / net / sched / sch_atm.c
index 4d876598d7dfeb2ec3ea06d06793dd0305c69aa0..0c71f2eb96bca36c285d44e96d90850ecb8e5620 100644 (file)
@@ -231,7 +231,7 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent,
 
        if (!tb[TCA_ATM_FD] || nla_len(tb[TCA_ATM_FD]) < sizeof(fd))
                return -EINVAL;
-       fd = *(int *)nla_data(tb[TCA_ATM_FD]);
+       fd = nla_get_u32(tb[TCA_ATM_FD]);
        pr_debug("atm_tc_change: fd %d\n", fd);
        if (tb[TCA_ATM_HDR]) {
                hdr_len = nla_len(tb[TCA_ATM_HDR]);
@@ -246,7 +246,7 @@ static int atm_tc_change(struct Qdisc *sch, u32 classid, u32 parent,
                if (nla_len(tb[TCA_ATM_EXCESS]) != sizeof(u32))
                        return -EINVAL;
                excess = (struct atm_flow_data *)
-                       atm_tc_get(sch, *(u32 *)nla_data(tb[TCA_ATM_EXCESS]));
+                       atm_tc_get(sch, nla_get_u32(tb[TCA_ATM_EXCESS]));
                if (!excess)
                        return -ENOENT;
        }
This page took 0.039017 seconds and 5 git commands to generate.