forked from mirrors/kore
shmat() returns (void *)-1 upon error.
This commit is contained in:
parent
dbad4e7160
commit
eb235b3e01
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user