ext/sysvsem: use bool type instead of int

This commit is contained in:
Gina Peter Banyard 2025-07-18 18:25:24 +01:00
parent bac158c80d
commit 87d83d162d

View file

@ -266,7 +266,7 @@ PHP_FUNCTION(sem_get)
/* }}} */
/* {{{ php_sysvsem_semop */
static void php_sysvsem_semop(INTERNAL_FUNCTION_PARAMETERS, int acquire)
static void php_sysvsem_semop(INTERNAL_FUNCTION_PARAMETERS, bool acquire)
{
zval *arg_id;
bool nowait = 0;
@ -311,14 +311,14 @@ static void php_sysvsem_semop(INTERNAL_FUNCTION_PARAMETERS, int acquire)
/* {{{ Acquires the semaphore with the given id, blocking if necessary */
PHP_FUNCTION(sem_acquire)
{
php_sysvsem_semop(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
php_sysvsem_semop(INTERNAL_FUNCTION_PARAM_PASSTHRU, true);
}
/* }}} */
/* {{{ Releases the semaphore with the given id */
PHP_FUNCTION(sem_release)
{
php_sysvsem_semop(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
php_sysvsem_semop(INTERNAL_FUNCTION_PARAM_PASSTHRU, false);
}
/* }}} */