]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/ecryptfs/netlink.c
[NETLINK]: Introduce nlmsg_hdr() helper
[net-next-2.6.git] / fs / ecryptfs / netlink.c
index e3aa2253c8508e1b316a0b3a32e04472cdb51712..8405d216a5fc3750eca0596395f1866963f5bb2a 100644 (file)
@@ -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");