diff options
author | drh <drh@noemail.net> | 2015-12-02 15:44:39 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2015-12-02 15:44:39 +0000 |
commit | 333e6ca9a5a38d756cac1e64669b4b4a5c65e8e8 (patch) | |
tree | f64a58c07b1101b705ea19a9c3aee88cf1895d1d /src | |
parent | f3b1ed0fc219d9c3a7caac14694b18bcc6c5c025 (diff) | |
download | sqlite-333e6ca9a5a38d756cac1e64669b4b4a5c65e8e8.tar.gz sqlite-333e6ca9a5a38d756cac1e64669b4b4a5c65e8e8.zip |
Remove an unreachable branch from the unixMapfile() routine of the unix VFS.
FossilOrigin-Name: b50f67bc46e65fe4e51667d48b4add58706a9443
Diffstat (limited to 'src')
-rw-r--r-- | src/os_unix.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 00602c6b8..31e3215b8 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -4768,6 +4768,7 @@ static void unixRemapfile( */ static int unixMapfile(unixFile *pFd, i64 nMap){ assert( nMap>=0 || pFd->nFetchOut==0 ); + assert( nMap>0 || (pFd->mmapSize==0 && pFd->pMapRegion==0) ); if( pFd->nFetchOut>0 ) return SQLITE_OK; if( nMap<0 ){ @@ -4781,12 +4782,9 @@ static int unixMapfile(unixFile *pFd, i64 nMap){ nMap = pFd->mmapSizeMax; } + assert( nMap>0 || (pFd->mmapSize==0 && pFd->pMapRegion==0) ); if( nMap!=pFd->mmapSize ){ - if( nMap>0 ){ - unixRemapfile(pFd, nMap); - }else{ - unixUnmapfile(pFd); - } + unixRemapfile(pFd, nMap); } return SQLITE_OK; |