Skip to content

Commit a5afa4a

Browse files
committed
pdo: Use true / false instead of 1 / 0 for bool parameters
Changes done with Coccinelle: @r1@ identifier F; identifier p; typedef bool; parameter list [n1] PL1; parameter list [n2] PL2; @@ F(PL1, bool p, PL2) { ... } @r2@ identifier r1.F; expression list [r1.n1] EL1; expression list [r1.n2] EL2; @@ F(EL1, ( - 1 + true | - 0 + false ) , EL2)
1 parent c5b344d commit a5afa4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/pdo/pdo_dbh.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,7 @@ static void pdo_dbh_free_storage(zend_object *std)
15941594
dbh->methods->persistent_shutdown(dbh);
15951595
}
15961596
zend_object_std_dtor(std);
1597-
dbh_free(dbh, 0);
1597+
dbh_free(dbh, false);
15981598
}
15991599

16001600
zend_object *pdo_dbh_new(zend_class_entry *ce)
@@ -1618,7 +1618,7 @@ ZEND_RSRC_DTOR_FUNC(php_pdo_pdbh_dtor) /* {{{ */
16181618
{
16191619
if (res->ptr) {
16201620
pdo_dbh_t *dbh = (pdo_dbh_t*)res->ptr;
1621-
dbh_free(dbh, 1);
1621+
dbh_free(dbh, true);
16221622
res->ptr = NULL;
16231623
}
16241624
}

0 commit comments

Comments
 (0)