summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOBATA Akio <obache@users.noreply.github.com>2015-07-19 14:34:36 +0900
committerOBATA Akio <obache@users.noreply.github.com>2015-07-19 14:34:36 +0900
commit80a82ee011e93fdf18c176b5508c859a4e28440c (patch)
tree71de2035ab82a8d4241bccddc21551aae867f23a
parent7e6ec25a752c1bb247344eba1999c67804ed504b (diff)
downloadlibpinyin-80a82ee011e93fdf18c176b5508c859a4e28440c.tar.gz
libpinyin-80a82ee011e93fdf18c176b5508c859a4e28440c.tar.xz
libpinyin-80a82ee011e93fdf18c176b5508c859a4e28440c.zip
Resolve NULL used in arithmetic
-rw-r--r--src/storage/phrase_index.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/storage/phrase_index.cpp b/src/storage/phrase_index.cpp
index ede3cac..3f13042 100644
--- a/src/storage/phrase_index.cpp
+++ b/src/storage/phrase_index.cpp
@@ -624,7 +624,7 @@ int SubPhraseIndex::get_range(/* out */ PhraseIndexRange & range){
/* remove trailing zeros. */
const table_offset_t * poffset = NULL;
for (poffset = end; poffset > begin + 1; --poffset) {
- if (NULL != *(poffset - 1))
+ if (0 != *(poffset - 1))
break;
}