Commit 76237576 authored by Cong Wang's avatar Cong Wang Committed by David S. Miller

doc: fix some syntax errors in netlink mmap sample code

Cc: Patrick McHardy <kaber@trash.net>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: default avatarCong Wang <amwang@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3e4f8b78
...@@ -274,9 +274,9 @@ This example assumes some ring parameters of the ring setup are available. ...@@ -274,9 +274,9 @@ This example assumes some ring parameters of the ring setup are available.
/* Get next frame header */ /* Get next frame header */
hdr = rx_ring + frame_offset; hdr = rx_ring + frame_offset;
if (hdr->nm_status == NL_MMAP_STATUS_VALID) if (hdr->nm_status == NL_MMAP_STATUS_VALID) {
/* Regular memory mapped frame */ /* Regular memory mapped frame */
nlh = (void *hdr) + NL_MMAP_HDRLEN; nlh = (void *)hdr + NL_MMAP_HDRLEN;
len = hdr->nm_len; len = hdr->nm_len;
/* Release empty message immediately. May happen /* Release empty message immediately. May happen
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment