diff options
author | Patrick McHardy <kaber@trash.net> | 2008-01-23 20:35:03 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 15:11:21 -0800 |
commit | 1587bac49f8491b5006a78f8d726111b71757941 (patch) | |
tree | 753e9fb452917efd9da6751fa4c6a45442c9fb8d /net/sched/cls_fw.c | |
parent | 24beeab539c6f42c4a93e2ff7c3b5f272e60da45 (diff) | |
download | linux-stable-1587bac49f8491b5006a78f8d726111b71757941.tar.gz linux-stable-1587bac49f8491b5006a78f8d726111b71757941.tar.bz2 linux-stable-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/cls_fw.c')
-rw-r--r-- | net/sched/cls_fw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c index 61ebe25e5f77..b75696d67ec2 100644 --- a/net/sched/cls_fw.c +++ b/net/sched/cls_fw.c @@ -203,7 +203,7 @@ fw_change_attrs(struct tcf_proto *tp, struct fw_filter *f, if (tb[TCA_FW_CLASSID]) { if (nla_len(tb[TCA_FW_CLASSID]) != sizeof(u32)) goto errout; - f->res.classid = *(u32*)nla_data(tb[TCA_FW_CLASSID]); + f->res.classid = nla_get_u32(tb[TCA_FW_CLASSID]); tcf_bind_filter(tp, &f->res, base); } @@ -218,7 +218,7 @@ fw_change_attrs(struct tcf_proto *tp, struct fw_filter *f, if (tb[TCA_FW_MASK]) { if (nla_len(tb[TCA_FW_MASK]) != sizeof(u32)) goto errout; - mask = *(u32*)nla_data(tb[TCA_FW_MASK]); + mask = nla_get_u32(tb[TCA_FW_MASK]); if (mask != head->mask) goto errout; } else if (head->mask != 0xFFFFFFFF) @@ -264,7 +264,7 @@ static int fw_change(struct tcf_proto *tp, unsigned long base, if (tb[TCA_FW_MASK]) { if (nla_len(tb[TCA_FW_MASK]) != sizeof(u32)) return -EINVAL; - mask = *(u32*)nla_data(tb[TCA_FW_MASK]); + mask = nla_get_u32(tb[TCA_FW_MASK]); } head = kzalloc(sizeof(struct fw_head), GFP_KERNEL); |