1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

dba: Use true / false instead of 1 / 0 when assigning to bool

Changes done with Coccinelle:

    @@
    bool b;
    @@

    - b = 0
    + b = false

    @@
    bool b;
    @@

    - b = 1
    + b = true
This commit is contained in:
Tim Düsterhus
2025-09-23 22:48:29 +02:00
committed by Tim Düsterhus
parent 88d153f45e
commit 82d546ace5
2 changed files with 5 additions and 5 deletions

View File

@@ -539,8 +539,8 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, bool persistent)
int persistent_flag = persistent ? STREAM_OPEN_PERSISTENT : 0;
char *lock_name;
#ifdef PHP_WIN32
bool restarted = 0;
bool need_creation = 0;
bool restarted = false;
bool need_creation = false;
#endif
zend_string *path;
@@ -923,7 +923,7 @@ restart:
lock_file_mode = "r+b";
restarted = 1;
restarted = true;
goto restart;
#endif
}
@@ -1277,7 +1277,7 @@ PHP_FUNCTION(dba_sync)
/* {{{ List configured database handlers */
PHP_FUNCTION(dba_handlers)
{
bool full_info = 0;
bool full_info = false;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|b", &full_info) == FAILURE) {
RETURN_THROWS();

View File

@@ -127,7 +127,7 @@ DBA_DELETE_FUNC(inifile)
{
inifile *dba = info->dbf;
int res;
bool found = 0;
bool found = false;
key_type ini_key;
if (!key) {