From 1587bac49f8491b5006a78f8d726111b71757941 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Wed, 23 Jan 2008 20:35:03 -0800 Subject: [NET_SCHED]: Use typeful attribute parsing helpers Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- net/sched/act_police.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'net/sched/act_police.c') diff --git a/net/sched/act_police.c b/net/sched/act_police.c index 79db6bb8a5f..62de806af3a 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, -- cgit v1.2.3