summaryrefslogtreecommitdiffstats
path: root/net/sched/act_police.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-01-23 20:35:03 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:11:21 -0800
commit1587bac49f8491b5006a78f8d726111b71757941 (patch)
tree753e9fb452917efd9da6751fa4c6a45442c9fb8d /net/sched/act_police.c
parent24beeab539c6f42c4a93e2ff7c3b5f272e60da45 (diff)
downloadop-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/act_police.c')
-rw-r--r--net/sched/act_police.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index 79db6bb..62de806 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -203,7 +203,7 @@ override:
}
if (tb[TCA_POLICE_RESULT])
- police->tcfp_result = *(u32*)nla_data(tb[TCA_POLICE_RESULT]);
+ police->tcfp_result = nla_get_u32(tb[TCA_POLICE_RESULT]);
police->tcfp_toks = police->tcfp_burst = parm->burst;
police->tcfp_mtu = parm->mtu;
if (police->tcfp_mtu == 0) {
@@ -216,8 +216,7 @@ override:
police->tcf_action = parm->action;
if (tb[TCA_POLICE_AVRATE])
- police->tcfp_ewma_rate =
- *(u32*)nla_data(tb[TCA_POLICE_AVRATE]);
+ police->tcfp_ewma_rate = nla_get_u32(tb[TCA_POLICE_AVRATE]);
if (est)
gen_replace_estimator(&police->tcf_bstats,
&police->tcf_rate_est,
OpenPOWER on IntegriCloud