formatting
This commit is contained in:
parent
293ceabb78
commit
8142b5eb81
|
@ -265,10 +265,10 @@ static void *alloc_pages(mpool_t *mp_p, const unsigned int page_n,
|
|||
|
||||
|
||||
state = MAP_PRIVATE;
|
||||
#ifdef MAP_FILE
|
||||
#if defined(MAP_FILE)
|
||||
state |= MAP_FILE;
|
||||
#endif
|
||||
#ifdef MAP_VARIABLE
|
||||
#if defined(MAP_VARIABLE)
|
||||
state |= MAP_VARIABLE;
|
||||
#endif
|
||||
|
||||
|
@ -278,8 +278,7 @@ static void *alloc_pages(mpool_t *mp_p, const unsigned int page_n,
|
|||
if (mem == (void *)MAP_FAILED) {
|
||||
if (errno == ENOMEM) {
|
||||
SET_POINTER(error_p, MPOOL_ERROR_NO_MEM);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
SET_POINTER(error_p, MPOOL_ERROR_MMAP);
|
||||
}
|
||||
return NULL;
|
||||
|
@ -1110,7 +1109,7 @@ int mpool_close(mpool_t *mp_p)
|
|||
addr = mp_p;
|
||||
}
|
||||
size = SIZE_OF_PAGES(mp_p, PAGES_IN_SIZE(mp_p, sizeof(mpool_t)));
|
||||
|
||||
printf("WTF\n");
|
||||
(void)munmap(addr, size);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue