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 /fs/ecryptfs | |
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 'fs/ecryptfs')
-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: | |||
97 | */ | 97 | */ |
98 | static int ecryptfs_process_nl_response(struct sk_buff *skb) | 98 | static int ecryptfs_process_nl_response(struct sk_buff *skb) |
99 | { | 99 | { |
100 | struct nlmsghdr *nlh = (struct nlmsghdr*)skb->data; | 100 | struct nlmsghdr *nlh = nlmsg_hdr(skb); |
101 | struct ecryptfs_message *msg = NLMSG_DATA(nlh); | 101 | struct ecryptfs_message *msg = NLMSG_DATA(nlh); |
102 | int rc; | 102 | int rc; |
103 | 103 | ||
@@ -181,7 +181,7 @@ receive: | |||
181 | "rc = [%d]\n", rc); | 181 | "rc = [%d]\n", rc); |
182 | return; | 182 | return; |
183 | } | 183 | } |
184 | nlh = (struct nlmsghdr *)skb->data; | 184 | nlh = nlmsg_hdr(skb); |
185 | if (!NLMSG_OK(nlh, skb->len)) { | 185 | if (!NLMSG_OK(nlh, skb->len)) { |
186 | ecryptfs_printk(KERN_ERR, "Received corrupt netlink " | 186 | ecryptfs_printk(KERN_ERR, "Received corrupt netlink " |
187 | "message\n"); | 187 | "message\n"); |