From aa08831b0c80e5edab76057be5596a968cbd2102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 23 Sep 2025 22:51:48 +0200 Subject: [PATCH] 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 --- ext/pdo_mysql/mysql_driver.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 786bd9c606c..808f4acbfa3 100644 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -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; } }