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_ipt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/sched/act_ipt.c') diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c index 5dd701a7bc56..7ab2419b44ec 100644 --- a/net/sched/act_ipt.c +++ b/net/sched/act_ipt.c @@ -123,7 +123,7 @@ static int tcf_ipt_init(struct nlattr *nla, struct nlattr *est, if (tb[TCA_IPT_INDEX] != NULL && nla_len(tb[TCA_IPT_INDEX]) >= sizeof(u32)) - index = *(u32 *)nla_data(tb[TCA_IPT_INDEX]); + index = nla_get_u32(tb[TCA_IPT_INDEX]); pc = tcf_hash_check(index, a, bind, &ipt_hash_info); if (!pc) { @@ -140,7 +140,7 @@ static int tcf_ipt_init(struct nlattr *nla, struct nlattr *est, } ipt = to_ipt(pc); - hook = *(u32 *)nla_data(tb[TCA_IPT_HOOK]); + hook = nla_get_u32(tb[TCA_IPT_HOOK]); err = -ENOMEM; tname = kmalloc(IFNAMSIZ, GFP_KERNEL); -- cgit v1.2.3