diff --git a/src/worker.c b/src/worker.c index bcf8a8b..a1555ff 100644 --- a/src/worker.c +++ b/src/worker.c @@ -91,7 +91,7 @@ kore_worker_init(void) fatal("kore_worker_init(): shmget() %s", errno_s); } - if ((accept_lock = shmat(shm_accept_key, NULL, 0)) == NULL) + if ((accept_lock = shmat(shm_accept_key, NULL, 0)) == (void *)-1) fatal("kore_worker_init(): shmat() %s", errno_s); accept_lock->lock = 0;