diff options
author | Patrick McHardy <kaber@trash.net> | 2008-01-23 20:35:03 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 15:11:21 -0800 |
commit | 1587bac49f8491b5006a78f8d726111b71757941 (patch) | |
tree | 753e9fb452917efd9da6751fa4c6a45442c9fb8d /net/sched/cls_u32.c | |
parent | 24beeab539c6f42c4a93e2ff7c3b5f272e60da45 (diff) | |
download | op-kernel-dev-1587bac49f8491b5006a78f8d726111b71757941.zip op-kernel-dev-1587bac49f8491b5006a78f8d726111b71757941.tar.gz |
[NET_SCHED]: Use typeful attribute parsing helpers
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_u32.c')
-rw-r--r-- | net/sched/cls_u32.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index 326711e..a4e72e8 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c @@ -474,7 +474,7 @@ static int u32_set_parms(struct tcf_proto *tp, unsigned long base, err = -EINVAL; if (tb[TCA_U32_LINK]) { - u32 handle = *(u32*)nla_data(tb[TCA_U32_LINK]); + u32 handle = nla_get_u32(tb[TCA_U32_LINK]); struct tc_u_hnode *ht_down = NULL; if (TC_U32_KEY(handle)) @@ -496,7 +496,7 @@ static int u32_set_parms(struct tcf_proto *tp, unsigned long base, ht_down->refcnt--; } if (tb[TCA_U32_CLASSID]) { - n->res.classid = *(u32*)nla_data(tb[TCA_U32_CLASSID]); + n->res.classid = nla_get_u32(tb[TCA_U32_CLASSID]); tcf_bind_filter(tp, &n->res, base); } @@ -543,7 +543,7 @@ static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle, } if (tb[TCA_U32_DIVISOR]) { - unsigned divisor = *(unsigned*)nla_data(tb[TCA_U32_DIVISOR]); + unsigned divisor = nla_get_u32(tb[TCA_U32_DIVISOR]); if (--divisor > 0x100) return -EINVAL; @@ -569,7 +569,7 @@ static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle, } if (tb[TCA_U32_HASH]) { - htid = *(unsigned*)nla_data(tb[TCA_U32_HASH]); + htid = nla_get_u32(tb[TCA_U32_HASH]); if (TC_U32_HTID(htid) == TC_U32_ROOT) { ht = tp->root; htid = ht->handle; |