diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-25 22:08:35 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:26:34 -0400 |
commit | b529ccf2799c14346d1518e9bdf1f88f03643e99 (patch) | |
tree | f899a5a5d66d2ca21724c1871ee3afeda6c4a670 /security/selinux/hooks.c | |
parent | 965ffea43d4ebe8cd7b9fee78d651268dd7d23c5 (diff) |
[NETLINK]: Introduce nlmsg_hdr() helper
For the common "(struct nlmsghdr *)skb->data" sequence, so that we reduce the
number of direct accesses to skb->data and for consistency with all the other
cast skb member helpers.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index addb58501057..5f02b4be1917 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -3786,7 +3786,7 @@ static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) | |||
3786 | err = -EINVAL; | 3786 | err = -EINVAL; |
3787 | goto out; | 3787 | goto out; |
3788 | } | 3788 | } |
3789 | nlh = (struct nlmsghdr *)skb->data; | 3789 | nlh = nlmsg_hdr(skb); |
3790 | 3790 | ||
3791 | err = selinux_nlmsg_lookup(isec->sclass, nlh->nlmsg_type, &perm); | 3791 | err = selinux_nlmsg_lookup(isec->sclass, nlh->nlmsg_type, &perm); |
3792 | if (err) { | 3792 | if (err) { |