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

tokenizer: Use return true / return false for functions returning bool

Changes done with Coccinelle:

    @r1@
    identifier fn;
    typedef bool;
    symbol false;
    symbol true;
    @@

    bool fn ( ... )
    {
    <...
    return
    (
    - 0
    + false
    |
    - 1
    + true
    )
    ;
    ...>
    }

Coccinelle patch sourced from
torvalds/linux@46b5c9b856.
This commit is contained in:
Tim Düsterhus
2025-09-23 23:10:17 +02:00
committed by Tim Düsterhus
parent c743b71b40
commit 9d187498bb

View File

@@ -381,7 +381,7 @@ static bool tokenize(zval *return_value, zend_string *source, zend_class_entry *
zend_restore_lexical_state(&original_lex_state);
zend_hash_destroy(&interned_strings);
return 1;
return true;
}
struct event_context {