summaryrefslogtreecommitdiff
path: root/ext/shmop/shmop.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/shmop/shmop.c')
-rw-r--r--ext/shmop/shmop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c
index d647790aa0..e65df7f790 100644
--- a/ext/shmop/shmop.c
+++ b/ext/shmop/shmop.c
@@ -305,7 +305,7 @@ PHP_FUNCTION(shmop_size)
PHP_FUNCTION(shmop_write)
{
struct php_shmop *shmop;
- int writesize;
+ zend_long writesize;
zend_long offset;
zend_string *data;
zval *shmid;
@@ -328,7 +328,7 @@ PHP_FUNCTION(shmop_write)
RETURN_FALSE;
}
- writesize = (ZSTR_LEN(data) < shmop->size - offset) ? ZSTR_LEN(data) : shmop->size - offset;
+ writesize = ((zend_long)ZSTR_LEN(data) < shmop->size - offset) ? (zend_long)ZSTR_LEN(data) : shmop->size - offset;
memcpy(shmop->addr + offset, ZSTR_VAL(data), writesize);
RETURN_LONG(writesize);