diff options
author | Peng Wu <alexepico@gmail.com> | 2013-02-05 11:41:37 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2013-02-05 11:41:37 +0800 |
commit | d30adf07184360c5c0ba9cb50bd9e021285de477 (patch) | |
tree | 9033ac0131c3354bf4bb80302e931e27f2e4237d | |
parent | e70fa35d198a802c58ffc30968c21729d88c4f25 (diff) | |
download | libpinyin-d30adf07184360c5c0ba9cb50bd9e021285de477.tar.gz libpinyin-d30adf07184360c5c0ba9cb50bd9e021285de477.tar.xz libpinyin-d30adf07184360c5c0ba9cb50bd9e021285de477.zip |
fixes typo
-rw-r--r-- | src/include/memory_chunk.h | 3 | ||||
-rw-r--r-- | src/storage/chewing_large_table.h | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/include/memory_chunk.h b/src/include/memory_chunk.h index da5c7d1..7b315af 100644 --- a/src/include/memory_chunk.h +++ b/src/include/memory_chunk.h @@ -28,7 +28,6 @@ #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> -#include <stdio.h> #include <stdlib.h> #ifdef HAVE_MMAP #include <sys/mman.h> @@ -393,7 +392,7 @@ public: * */ bool save(const char * filename){ - int fd = open(filename, O_WRONLY|O_CREAT, 0644); + int fd = open(filename, O_CREAT|O_WRONLY|O_TRUNC, 0644); if ( -1 == fd ) return false; diff --git a/src/storage/chewing_large_table.h b/src/storage/chewing_large_table.h index 59f494e..6ec218f 100644 --- a/src/storage/chewing_large_table.h +++ b/src/storage/chewing_large_table.h @@ -23,6 +23,7 @@ #define CHEWING_LARGE_TABLE_H +#include <stdio.h> #include "novel_types.h" #include "memory_chunk.h" #include "chewing_key.h" |