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/act_police.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/act_police.c')
-rw-r--r-- | net/sched/act_police.c | 5 |
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: | |||
203 | } | 203 | } |
204 | 204 | ||
205 | if (tb[TCA_POLICE_RESULT]) | 205 | if (tb[TCA_POLICE_RESULT]) |
206 | police->tcfp_result = *(u32*)nla_data(tb[TCA_POLICE_RESULT]); | 206 | police->tcfp_result = nla_get_u32(tb[TCA_POLICE_RESULT]); |
207 | police->tcfp_toks = police->tcfp_burst = parm->burst; | 207 | police->tcfp_toks = police->tcfp_burst = parm->burst; |
208 | police->tcfp_mtu = parm->mtu; | 208 | police->tcfp_mtu = parm->mtu; |
209 | if (police->tcfp_mtu == 0) { | 209 | if (police->tcfp_mtu == 0) { |
@@ -216,8 +216,7 @@ override: | |||
216 | police->tcf_action = parm->action; | 216 | police->tcf_action = parm->action; |
217 | 217 | ||
218 | if (tb[TCA_POLICE_AVRATE]) | 218 | if (tb[TCA_POLICE_AVRATE]) |
219 | police->tcfp_ewma_rate = | 219 | police->tcfp_ewma_rate = nla_get_u32(tb[TCA_POLICE_AVRATE]); |
220 | *(u32*)nla_data(tb[TCA_POLICE_AVRATE]); | ||
221 | if (est) | 220 | if (est) |
222 | gen_replace_estimator(&police->tcf_bstats, | 221 | gen_replace_estimator(&police->tcf_bstats, |
223 | &police->tcf_rate_est, | 222 | &police->tcf_rate_est, |