summaryrefslogtreecommitdiffstats
path: root/drivers/connector
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-25 19:08:35 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:26:34 -0700
commitb529ccf2799c14346d1518e9bdf1f88f03643e99 (patch)
treef899a5a5d66d2ca21724c1871ee3afeda6c4a670 /drivers/connector
parent965ffea43d4ebe8cd7b9fee78d651268dd7d23c5 (diff)
downloadop-kernel-dev-b529ccf2799c14346d1518e9bdf1f88f03643e99.zip
op-kernel-dev-b529ccf2799c14346d1518e9bdf1f88f03643e99.tar.gz
[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 'drivers/connector')
-rw-r--r--drivers/connector/connector.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index a905f78..7f9c4fb 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -212,7 +212,7 @@ static void cn_rx_skb(struct sk_buff *__skb)
skb = skb_get(__skb);
if (skb->len >= NLMSG_SPACE(0)) {
- nlh = (struct nlmsghdr *)skb->data;
+ nlh = nlmsg_hdr(skb);
if (nlh->nlmsg_len < sizeof(struct cn_msg) ||
skb->len < nlh->nlmsg_len ||
OpenPOWER on IntegriCloud