kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit cb4567683a2ca19c8f619654c67a43768da1114e
parent 6a35a8a455a520560f1f9891744537ad4562b786
Author: Joris Vink <joris@coders.se>
Date:   Wed,  4 Apr 2018 09:34:18 +0200

use MAP_FAILED.

Diffstat:
src/pool.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pool.c b/src/pool.c @@ -147,7 +147,7 @@ pool_region_create(struct kore_pool *pool, size_t elms) reg->length = elms * pool->slen; reg->start = mmap(NULL, reg->length, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); - if (reg->start == NULL) + if (reg->start == MAP_FAILED) fatal("mmap: %s", errno_s); p = (u_int8_t *)reg->start;