Skip to content

Commit

Permalink
Fixed 64-bit build
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Nov 17, 2016
1 parent a676370 commit c2173c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ext/opcache/zend_accelerator_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static ZEND_INI_MH(OnUpdateMemoryConsumption)
#else
char *base = (char *) ts_resource(*((int *) mh_arg2));
#endif
zend_long overflow;
zend_long megabyte, overflow;
double dummy;

/* keep the compiler happy */
Expand All @@ -132,7 +132,8 @@ static ZEND_INI_MH(OnUpdateMemoryConsumption)

ini_entry->value = zend_string_init(new_new_value, 1, 1);
}
ZEND_SIGNED_MULTIPLY_LONG(memsize, 1024 * 1024, *p, dummy, overflow);
megabyte = 1024 * 1024;
ZEND_SIGNED_MULTIPLY_LONG(memsize, megabyte, *p, dummy, overflow);
if (UNEXPECTED(overflow)) {
*p = ZEND_ULONG_MAX;
}
Expand Down

0 comments on commit c2173c1

Please sign in to comment.