From: Baofeng Wang Date: Tue, 17 May 2016 08:42:30 +0000 (+0300) Subject: lib-fts: fixup misuse of hash_table_insert() X-Git-Tag: 2.3.0.rc1~3575 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0531c4817898a164fea7522ac73782da99b313ef;p=thirdparty%2Fdovecot%2Fcore.git lib-fts: fixup misuse of hash_table_insert() Instead use hash_table_update() to replace value when a key exsists. --- diff --git a/src/lib-fts/fts-filter-stopwords.c b/src/lib-fts/fts-filter-stopwords.c index 8b7a1067a5..82723f85a6 100644 --- a/src/lib-fts/fts-filter-stopwords.c +++ b/src/lib-fts/fts-filter-stopwords.c @@ -41,7 +41,7 @@ static int fts_filter_stopwords_read_list(struct fts_filter_stopwords *filter, if (strcspn(line, STOPWORDS_DISALLOWED_CHARS) < len) continue; word = p_strndup(filter->pool, line, len); - hash_table_insert(filter->stopwords, word, word); + hash_table_update(filter->stopwords, word, word); } if (input->stream_errno != 0) {