Skip to content

Commit 7623757

Browse files
Cong Wangdavem330
authored andcommitted
doc: fix some syntax errors in netlink mmap sample code
Cc: Patrick McHardy <[email protected]> Cc: David S. Miller <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3e4f8b7 commit 7623757

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Documentation/networking/netlink_mmap.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ This example assumes some ring parameters of the ring setup are available.
274274
/* Get next frame header */
275275
hdr = rx_ring + frame_offset;
276276

277-
if (hdr->nm_status == NL_MMAP_STATUS_VALID)
277+
if (hdr->nm_status == NL_MMAP_STATUS_VALID) {
278278
/* Regular memory mapped frame */
279-
nlh = (void *hdr) + NL_MMAP_HDRLEN;
279+
nlh = (void *)hdr + NL_MMAP_HDRLEN;
280280
len = hdr->nm_len;
281281

282282
/* Release empty message immediately. May happen

0 commit comments

Comments
 (0)