]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/netlink/af_netlink.c
[NETLINK]: Remove unused groups variable
[net-next-2.6.git] / net / netlink / af_netlink.c
index 350ed1c0e70252ba52c72806d622ddcc6e6eeef1..8488c15f26434a6f05aa67430563bad101c9b74f 100644 (file)
@@ -396,7 +396,6 @@ static int netlink_create(struct socket *sock, int protocol)
 {
        struct module *module = NULL;
        struct netlink_sock *nlk;
-       unsigned int groups;
        int err = 0;
 
        sock->state = SS_UNCONNECTED;
@@ -418,7 +417,6 @@ static int netlink_create(struct socket *sock, int protocol)
        if (nl_table[protocol].registered &&
            try_module_get(nl_table[protocol].module))
                module = nl_table[protocol].module;
-       groups = nl_table[protocol].groups;
        netlink_unlock_table();
 
        if ((err = __netlink_create(sock, protocol)) < 0)
@@ -1215,7 +1213,7 @@ static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock,
                copied = len;
        }
 
-       skb->h.raw = skb->data;
+       skb_reset_transport_header(skb);
        err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);
 
        if (msg->msg_name) {
@@ -1471,7 +1469,7 @@ static int netlink_rcv_skb(struct sk_buff *skb, int (*cb)(struct sk_buff *,
        int err;
 
        while (skb->len >= nlmsg_total_size(0)) {
-               nlh = (struct nlmsghdr *) skb->data;
+               nlh = nlmsg_hdr(skb);
 
                if (nlh->nlmsg_len < NLMSG_HDRLEN || skb->len < nlh->nlmsg_len)
                        return 0;