doc: fix some syntax errors in netlink mmap sample code
authorCong Wang <amwang@redhat.com>
Mon, 24 Jun 2013 11:46:54 +0000 (19:46 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Jun 2013 23:47:02 +0000 (16:47 -0700)
Cc: Patrick McHardy <kaber@trash.net>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/netlink_mmap.txt

index e6088ba..5cc6005 100644 (file)
@@ -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