summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/iobuf.c
diff options
context:
space:
mode:
authorAnand V. Avati <avati@gluster.com>2009-04-13 14:02:57 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-04-13 14:55:09 +0530
commit00dff3bddc375e88e710a751f47843f9da77a70c (patch)
tree8f757ba8ec744e71950345321a6d88d1e0c3f66f /libglusterfs/src/iobuf.c
parent014cdf385642947d0592102b2c7338a8ad1c2d4e (diff)
use MAP_FAILED macro to check for mmap failure instead of (void *) -1
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfs/src/iobuf.c')
-rw-r--r--libglusterfs/src/iobuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libglusterfs/src/iobuf.c b/libglusterfs/src/iobuf.c
index 2a97d9995..b54f31243 100644
--- a/libglusterfs/src/iobuf.c
+++ b/libglusterfs/src/iobuf.c
@@ -118,7 +118,7 @@ __iobuf_arena_alloc (struct iobuf_pool *iobuf_pool)
arena_size = iobuf_pool->arena_size;
iobuf_arena->mem_base = mmap (NULL, arena_size, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
- if (iobuf_arena->mem_base == ((void *) -1))
+ if (iobuf_arena->mem_base == MAP_FAILED)
goto err;
__iobuf_arena_init_iobufs (iobuf_arena);