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

pdo_mysql: 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:51:48 +02:00
committed by Tim Düsterhus
parent 3da898a7d9
commit aa08831b0c

View File

@@ -308,21 +308,21 @@ static zend_string *pdo_mysql_last_insert_id(pdo_dbh_t *dbh, const zend_string *
static zend_string* mysql_handle_quoter(pdo_dbh_t *dbh, const zend_string *unquoted, enum pdo_param_type paramtype )
{
pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;
bool use_national_character_set = 0;
bool use_binary = 0;
bool use_national_character_set = false;
bool use_binary = false;
size_t quotedlen;
if ((paramtype & PDO_PARAM_LOB) == PDO_PARAM_LOB) {
use_binary = 1;
use_binary = true;
} else {
if (H->assume_national_character_set_strings) {
use_national_character_set = 1;
use_national_character_set = true;
}
if ((paramtype & PDO_PARAM_STR_NATL) == PDO_PARAM_STR_NATL) {
use_national_character_set = 1;
use_national_character_set = true;
}
if ((paramtype & PDO_PARAM_STR_CHAR) == PDO_PARAM_STR_CHAR) {
use_national_character_set = 0;
use_national_character_set = false;
}
}