dovecot-2.2: lib-fts: simple tokenizer minor cleanup - removed u...

dovecot at dovecot.org dovecot at dovecot.org
Mon Jun 1 19:01:24 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/f44961c66a48
changeset: 18777:f44961c66a48
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jun 01 21:35:39 2015 +0300
description:
lib-fts: simple tokenizer minor cleanup - removed unnecessary token length > 0 check
fts_tokenizer_generic_simple_current_token() will check it in any case.

diffstat:

 src/lib-fts/fts-tokenizer-generic.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (22 lines):

diff -r 4a72ef26dbad -r f44961c66a48 src/lib-fts/fts-tokenizer-generic.c
--- a/src/lib-fts/fts-tokenizer-generic.c	Mon Jun 01 21:33:11 2015 +0300
+++ b/src/lib-fts/fts-tokenizer-generic.c	Mon Jun 01 21:35:39 2015 +0300
@@ -220,8 +220,7 @@
 		apostrophe = IS_APOSTROPHE(c);
 		if (fts_simple_is_word_break(tok, c, apostrophe)) {
 			tok_append_truncated(tok, data + start, i - start);
-			if (tok->token->used > 0 &&
-			    fts_tokenizer_generic_simple_current_token(tok, token_r)) {
+			if (fts_tokenizer_generic_simple_current_token(tok, token_r)) {
 				*skip_r = i + char_size;
 				return 1;
 			}
@@ -241,7 +240,7 @@
 	*skip_r = i;
 
 	/* return the last token */
-	if (size == 0 && tok->token->used > 0) {
+	if (size == 0) {
 		if (fts_tokenizer_generic_simple_current_token(tok, token_r))
 			return 1;
 	}


More information about the dovecot-cvs mailing list