From a1e1fa3ef835f66dea0ee87f0faec0d48c1eab73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 23 Sep 2025 22:51:21 +0200 Subject: [PATCH] pcre: 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/pcre/php_pcre.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 8e0fb2cce5f..8a0a54dd701 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1687,10 +1687,10 @@ matched: walk = ZSTR_VAL(replace_str); replace_end = walk + ZSTR_LEN(replace_str); walk_last = 0; - simple_string = 1; + simple_string = true; while (walk < replace_end) { if ('\\' == *walk || '$' == *walk) { - simple_string = 0; + simple_string = false; if (walk_last == '\\') { walk++; walk_last = 0;