summaryrefslogtreecommitdiff
path: root/ring.c
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-07-13 16:09:05 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-07-13 16:09:05 +0200
commit86373411a23051a18ae3ed01b180f838dbcd76e7 (patch)
treefe3661ffdbdda3b6d252f125f49ebb0556b04d3a /ring.c
parented57128990c02342e1abe7f2a3abd1568f965dc7 (diff)
misc: fix multiple NULL pointer sparse warnings
Those are fixes for the following warnings: pcap_mm.c:119:29: warning: Using plain integer as NULL pointer pcap_mm.c:141:29: warning: Using plain integer as NULL pointer ring.c:24:31: warning: Using plain integer as NULL pointer flowtop.c:1114:22: warning: Using plain integer as NULL pointer ifpps.c:1133:29: warning: Using plain integer as NULL pointer Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'ring.c')
-rw-r--r--ring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ring.c b/ring.c
index c5d2d99..a227957 100644
--- a/ring.c
+++ b/ring.c
@@ -21,7 +21,7 @@
void mmap_ring_generic(int sock, struct ring *ring)
{
- ring->mm_space = mmap(0, ring->mm_len, PROT_READ | PROT_WRITE,
+ ring->mm_space = mmap(NULL, ring->mm_len, PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_LOCKED | MAP_POPULATE, sock, 0);
if (ring->mm_space == MAP_FAILED)
panic("Cannot mmap {TX,RX}_RING!\n");