diff options
author | Patrick McHardy <kaber@trash.net> | 2008-01-23 23:35:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:11:21 -0500 |
commit | 1587bac49f8491b5006a78f8d726111b71757941 (patch) | |
tree | 753e9fb452917efd9da6751fa4c6a45442c9fb8d /net/sched/cls_u32.c | |
parent | 24beeab539c6f42c4a93e2ff7c3b5f272e60da45 (diff) |
[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 326711eb593c..a4e72e8a882f 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, | |||
474 | 474 | ||
475 | err = -EINVAL; | 475 | err = -EINVAL; |
476 | if (tb[TCA_U32_LINK]) { | 476 | if (tb[TCA_U32_LINK]) { |
477 | u32 handle = *(u32*)nla_data(tb[TCA_U32_LINK]); | 477 | u32 handle = nla_get_u32(tb[TCA_U32_LINK]); |
478 | struct tc_u_hnode *ht_down = NULL; | 478 | struct tc_u_hnode *ht_down = NULL; |
479 | 479 | ||
480 | if (TC_U32_KEY(handle)) | 480 | if (TC_U32_KEY(handle)) |
@@ -496,7 +496,7 @@ static int u32_set_parms(struct tcf_proto *tp, unsigned long base, | |||
496 | ht_down->refcnt--; | 496 | ht_down->refcnt--; |
497 | } | 497 | } |
498 | if (tb[TCA_U32_CLASSID]) { | 498 | if (tb[TCA_U32_CLASSID]) { |
499 | n->res.classid = *(u32*)nla_data(tb[TCA_U32_CLASSID]); | 499 | n->res.classid = nla_get_u32(tb[TCA_U32_CLASSID]); |
500 | tcf_bind_filter(tp, &n->res, base); | 500 | tcf_bind_filter(tp, &n->res, base); |
501 | } | 501 | } |
502 | 502 | ||
@@ -543,7 +543,7 @@ static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle, | |||
543 | } | 543 | } |
544 | 544 | ||
545 | if (tb[TCA_U32_DIVISOR]) { | 545 | if (tb[TCA_U32_DIVISOR]) { |
546 | unsigned divisor = *(unsigned*)nla_data(tb[TCA_U32_DIVISOR]); | 546 | unsigned divisor = nla_get_u32(tb[TCA_U32_DIVISOR]); |
547 | 547 | ||
548 | if (--divisor > 0x100) | 548 | if (--divisor > 0x100) |
549 | return -EINVAL; | 549 | return -EINVAL; |
@@ -569,7 +569,7 @@ static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle, | |||
569 | } | 569 | } |
570 | 570 | ||
571 | if (tb[TCA_U32_HASH]) { | 571 | if (tb[TCA_U32_HASH]) { |
572 | htid = *(unsigned*)nla_data(tb[TCA_U32_HASH]); | 572 | htid = nla_get_u32(tb[TCA_U32_HASH]); |
573 | if (TC_U32_HTID(htid) == TC_U32_ROOT) { | 573 | if (TC_U32_HTID(htid) == TC_U32_ROOT) { |
574 | ht = tp->root; | 574 | ht = tp->root; |
575 | htid = ht->handle; | 575 | htid = ht->handle; |