summaryrefslogtreecommitdiffstats
path: root/net/sched/act_police.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-01-24 05:35:03 +0100
committerDavid S. Miller <davem@davemloft.net>2008-01-29 00:11:21 +0100
commit1587bac49f8491b5006a78f8d726111b71757941 (patch)
tree753e9fb452917efd9da6751fa4c6a45442c9fb8d /net/sched/act_police.c
parent[NET_SCHED]: Use typeful attribute construction helpers (diff)
downloadlinux-1587bac49f8491b5006a78f8d726111b71757941.tar.xz
linux-1587bac49f8491b5006a78f8d726111b71757941.zip
[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 79db6bb8a5fd..62de806af3af 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,