Skip to contentSkip to conversation

doc: fix some syntax errors in netlink mmap sample code

PATCH Applied Cong Wang 2 participants 2 messages Jun 24, 2013 – Jun 25, 2013

Subsystems (3)
lore
Share & tools
lore

Cong Wang

author
#0 lore raw

PATCH 1/1 doc: fix some syntax errors in netlink mmap sample code

From: Cong Wang <[email protected]>

Cc Patrick McHardy <[email protected]>
Cc David S. Miller <[email protected]>

---

Documentation/networking/netlink_mmap.txt +2 -2
index e6088ba..5cc6005 100644
@@ -274,9 +274,9 @@ This example assumes some ring parameters of the ring setup are available.
 			/* Get next frame header */
 			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 */
-				nlh = (void *hdr) + NL_MMAP_HDRLEN;
+				nlh = (void *)hdr + NL_MMAP_HDRLEN;
 				len = hdr->nm_len;
 
 				/* Release empty message immediately. May happen