aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2011-06-01 20:13:36 +0000
committerdrh <drh@noemail.net>2011-06-01 20:13:36 +0000
commitfd019ef7ceaf17d41a47c3be1ef7309deb9be7eb (patch)
tree6c386520ee0486c0bae51acf44f2bdf10f56ec5d /src/os_unix.c
parent66dfec8b7a6052d4b639e5ab1910249aebb8828d (diff)
downloadsqlite-fd019ef7ceaf17d41a47c3be1ef7309deb9be7eb.tar.gz
sqlite-fd019ef7ceaf17d41a47c3be1ef7309deb9be7eb.zip
Make use of the sqlite3GetBoolean() interface for more robust processing
of the readonly_shm query parameter inside of unixShmMap(). FossilOrigin-Name: 1f930d7e04cd4a5ff3d91a0e9f1b62114f1cebd2
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index e6d1774a4..5860ae71a 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -3787,7 +3787,7 @@ static int unixOpenSharedMemory(unixFile *pDbFd){
if( pShmNode->h<0 ){
const char *zRO;
zRO = sqlite3_uri_parameter(pDbFd->zPath, "readonly_shm");
- if( zRO && (zRO[0]!='0' || zRO[1]!=0) ){
+ if( zRO && sqlite3GetBoolean(zRO) ){
pShmNode->h = robust_open(zShmFilename, O_RDONLY,
(sStat.st_mode & 0777));
pShmNode->isReadonly = 1;