diff options
author | 2013-10-28 09:40:41 -0700 | |
---|---|---|
committer | 2013-10-28 09:40:41 -0700 | |
commit | a72b2359cce2a7a912a7e556f9f6f0b4f26308b5 (patch) | |
tree | 7b328cf4f60322933a2061f91d9ee2c20cc157a0 | |
parent | 2492a9c965b5972ac5a046a737c274903e8d7584 (diff) | |
parent | 45d5d1e589771b68c4bc635e81b184bc52d65d36 (diff) | |
download | latinime-a72b2359cce2a7a912a7e556f9f6f0b4f26308b5.tar.gz latinime-a72b2359cce2a7a912a7e556f9f6f0b4f26308b5.tar.xz latinime-a72b2359cce2a7a912a7e556f9f6f0b4f26308b5.zip |
am 45d5d1e5: Merge "Open dictionary files always using O_RDONLY."
* commit '45d5d1e589771b68c4bc635e81b184bc52d65d36':
Open dictionary files always using O_RDONLY.
-rw-r--r-- | native/jni/src/suggest/policyimpl/dictionary/utils/mmapped_buffer.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/native/jni/src/suggest/policyimpl/dictionary/utils/mmapped_buffer.cpp b/native/jni/src/suggest/policyimpl/dictionary/utils/mmapped_buffer.cpp index 71f863290..28af97351 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/utils/mmapped_buffer.cpp +++ b/native/jni/src/suggest/policyimpl/dictionary/utils/mmapped_buffer.cpp @@ -30,8 +30,7 @@ namespace latinime { /* static */ MmappedBuffer::MmappedBufferPtr MmappedBuffer::openBuffer( const char *const path, const int bufferOffset, const int bufferSize, const bool isUpdatable) { - const int openMode = isUpdatable ? O_RDWR : O_RDONLY; - const int mmapFd = open(path, openMode); + const int mmapFd = open(path, O_RDONLY); if (mmapFd < 0) { AKLOGE("DICT: Can't open the source. path=%s errno=%d", path, errno); return MmappedBufferPtr(0); |