aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-25 22:08:35 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:26:34 -0400
commitb529ccf2799c14346d1518e9bdf1f88f03643e99 (patch)
treef899a5a5d66d2ca21724c1871ee3afeda6c4a670 /net/netlink
parent965ffea43d4ebe8cd7b9fee78d651268dd7d23c5 (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/netlink')
-rw-r--r--net/netlink/af_netlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 50dc5edb7752..04b72d3c1dea 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1471,7 +1471,7 @@ static int netlink_rcv_skb(struct sk_buff *skb, int (*cb)(struct sk_buff *,
1471 int err; 1471 int err;
1472 1472
1473 while (skb->len >= nlmsg_total_size(0)) { 1473 while (skb->len >= nlmsg_total_size(0)) {
1474 nlh = (struct nlmsghdr *) skb->data; 1474 nlh = nlmsg_hdr(skb);
1475 1475
1476 if (nlh->nlmsg_len < NLMSG_HDRLEN || skb->len < nlh->nlmsg_len) 1476 if (nlh->nlmsg_len < NLMSG_HDRLEN || skb->len < nlh->nlmsg_len)
1477 return 0; 1477 return 0;