From 055ecbc62878e86287d742c7246c21606cee8183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Schl=C3=BCter?= Date: Fri, 22 Jun 2012 12:48:39 +0200 Subject: Improve check for :memory: pseudo-filename in SQlite --- ext/pdo_sqlite/sqlite_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/pdo_sqlite/sqlite_driver.c') diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c index 115b3e2da2..6d469d90c5 100644 --- a/ext/pdo_sqlite/sqlite_driver.c +++ b/ext/pdo_sqlite/sqlite_driver.c @@ -760,7 +760,7 @@ static struct pdo_dbh_methods sqlite_methods = { static char *make_filename_safe(const char *filename TSRMLS_DC) { - if (*filename && strncmp(filename, ":memory:", sizeof(":memory:")-1)) { + if (*filename && memcmp(filename, ":memory:", sizeof(":memory:"))) { char *fullpath = expand_filepath(filename, NULL TSRMLS_CC); if (!fullpath) { -- cgit v1.2.1