diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-26 04:08:35 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 07:26:34 +0200 |
commit | b529ccf2799c14346d1518e9bdf1f88f03643e99 (patch) | |
tree | f899a5a5d66d2ca21724c1871ee3afeda6c4a670 /fs/ecryptfs/netlink.c | |
parent | [IPV4]: fib_trie root node settings (diff) | |
download | linux-b529ccf2799c14346d1518e9bdf1f88f03643e99.tar.xz linux-b529ccf2799c14346d1518e9bdf1f88f03643e99.zip |
[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 'fs/ecryptfs/netlink.c')
-rw-r--r-- | fs/ecryptfs/netlink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ecryptfs/netlink.c b/fs/ecryptfs/netlink.c index e3aa2253c850..8405d216a5fc 100644 --- a/fs/ecryptfs/netlink.c +++ b/fs/ecryptfs/netlink.c @@ -97,7 +97,7 @@ out: */ static int ecryptfs_process_nl_response(struct sk_buff *skb) { - struct nlmsghdr *nlh = (struct nlmsghdr*)skb->data; + struct nlmsghdr *nlh = nlmsg_hdr(skb); struct ecryptfs_message *msg = NLMSG_DATA(nlh); int rc; @@ -181,7 +181,7 @@ receive: "rc = [%d]\n", rc); return; } - nlh = (struct nlmsghdr *)skb->data; + nlh = nlmsg_hdr(skb); if (!NLMSG_OK(nlh, skb->len)) { ecryptfs_printk(KERN_ERR, "Received corrupt netlink " "message\n"); |