Skip to content

Commit

Permalink
Fully convert accel_remap_huge_pages to use zend_result
Browse files Browse the repository at this point in the history
Changes were lost during rebase...
  • Loading branch information
iluuu1994 committed Jun 22, 2022
1 parent 1380b65 commit 0429159
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/opcache/ZendAccelerator.c
Expand Up @@ -2937,7 +2937,7 @@ static void accel_globals_ctor(zend_accel_globals *accel_globals)
# endif

# if defined(MAP_HUGETLB) || defined(MADV_HUGEPAGE)
static int accel_remap_huge_pages(void *start, size_t size, size_t real_size, const char *name, size_t offset)
static zend_result accel_remap_huge_pages(void *start, size_t size, size_t real_size, const char *name, size_t offset)
{
void *ret = MAP_FAILED;
void *mem;
Expand All @@ -2950,7 +2950,7 @@ static int accel_remap_huge_pages(void *start, size_t size, size_t real_size, co
zend_error(E_WARNING,
ACCELERATOR_PRODUCT_NAME " huge_code_pages: mmap failed: %s (%d)",
strerror(errno), errno);
return -1;
return FAILURE;
}
memcpy(mem, start, real_size);

Expand All @@ -2975,7 +2975,7 @@ static int accel_remap_huge_pages(void *start, size_t size, size_t real_size, co
zend_error(E_WARNING,
ACCELERATOR_PRODUCT_NAME " huge_code_pages: madvise(HUGEPAGE) failed: %s (%d)",
strerror(errno), errno);
return -1;
return FAILURE;
}
# else
memcpy(start, mem, real_size);
Expand Down

0 comments on commit 0429159

Please sign in to comment.