diff options
author | 2013-10-28 16:37:41 +0000 | |
---|---|---|
committer | 2013-10-28 16:37:41 +0000 | |
commit | 45d5d1e589771b68c4bc635e81b184bc52d65d36 (patch) | |
tree | 7b328cf4f60322933a2061f91d9ee2c20cc157a0 | |
parent | 6e23e336ff9277a346e1c244d76034354acbd274 (diff) | |
parent | 2271c23dc68c15fc9a1f8db7179beac1f5d0c6df (diff) | |
download | latinime-45d5d1e589771b68c4bc635e81b184bc52d65d36.tar.gz latinime-45d5d1e589771b68c4bc635e81b184bc52d65d36.tar.xz latinime-45d5d1e589771b68c4bc635e81b184bc52d65d36.zip |
Merge "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); |