[NET_SCHED]: Use typeful attribute parsing helpers
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
24beeab539
commit
1587bac49f
@@ -600,7 +600,7 @@ static int meta_int_change(struct meta_value *dst, struct nlattr *nla)
|
||||
dst->val = *(unsigned long *) nla_data(nla);
|
||||
dst->len = sizeof(unsigned long);
|
||||
} else if (nla_len(nla) == sizeof(u32)) {
|
||||
dst->val = *(u32 *) nla_data(nla);
|
||||
dst->val = nla_get_u32(nla);
|
||||
dst->len = sizeof(u32);
|
||||
} else
|
||||
return -EINVAL;
|
||||
|
Reference in New Issue
Block a user