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 /net/tipc | |
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 'net/tipc')
-rw-r--r-- | net/tipc/netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/netlink.c b/net/tipc/netlink.c index b8e1edc2bad..4cdafa2d1d4 100644 --- a/net/tipc/netlink.c +++ b/net/tipc/netlink.c | |||
@@ -57,7 +57,7 @@ static int handle_cmd(struct sk_buff *skb, struct genl_info *info) | |||
57 | 57 | ||
58 | if (rep_buf) { | 58 | if (rep_buf) { |
59 | skb_push(rep_buf, hdr_space); | 59 | skb_push(rep_buf, hdr_space); |
60 | rep_nlh = (struct nlmsghdr *)rep_buf->data; | 60 | rep_nlh = nlmsg_hdr(rep_buf); |
61 | memcpy(rep_nlh, req_nlh, hdr_space); | 61 | memcpy(rep_nlh, req_nlh, hdr_space); |
62 | rep_nlh->nlmsg_len = rep_buf->len; | 62 | rep_nlh->nlmsg_len = rep_buf->len; |
63 | genlmsg_unicast(rep_buf, req_nlh->nlmsg_pid); | 63 | genlmsg_unicast(rep_buf, req_nlh->nlmsg_pid); |