summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/sqlite_driver.c
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-12-23 15:02:50 +0100
committerGeorge Peter Banyard <girgias@php.net>2021-01-06 10:21:06 +0000
commit954d3743cce0390f4435cf118d20b84a7320a836 (patch)
tree890dd11ddae1a23b66182ae6ddb4b593de897afa /ext/pdo_sqlite/sqlite_driver.c
parent43f69160cfac8e33969e059eeab756a223be4480 (diff)
downloadphp-git-954d3743cce0390f4435cf118d20b84a7320a836.tar.gz
Boolify PDO's quoter handler
Diffstat (limited to 'ext/pdo_sqlite/sqlite_driver.c')
-rw-r--r--ext/pdo_sqlite/sqlite_driver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c
index dc494686dd..9998ef2d20 100644
--- a/ext/pdo_sqlite/sqlite_driver.c
+++ b/ext/pdo_sqlite/sqlite_driver.c
@@ -230,12 +230,12 @@ static char *pdo_sqlite_last_insert_id(pdo_dbh_t *dbh, const char *name, size_t
}
/* NB: doesn't handle binary strings... use prepared stmts for that */
-static int sqlite_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, size_t unquotedlen, char **quoted, size_t *quotedlen, enum pdo_param_type paramtype )
+static bool sqlite_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, size_t unquotedlen, char **quoted, size_t *quotedlen, enum pdo_param_type paramtype )
{
*quoted = safe_emalloc(2, unquotedlen, 3);
sqlite3_snprintf(2*unquotedlen + 3, *quoted, "'%q'", unquoted);
*quotedlen = strlen(*quoted);
- return 1;
+ return true;
}
static bool sqlite_handle_begin(pdo_dbh_t *dbh)