mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
965ffea43d
commit
b529ccf279
15 changed files with 23 additions and 18 deletions
|
|
@ -1471,7 +1471,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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue