diff options
author | pgen <p.gen.progs@gmail.com> | 2021-10-18 13:47:58 +0200 |
---|---|---|
committer | pgen <p.gen.progs@gmail.com> | 2021-10-18 13:47:58 +0200 |
commit | 0ce076bbfcd96913ab5add1b5a0b2ff13d68462a (patch) | |
tree | 8e843aed006776ddf9671e336b0effb2cd6ac763 /smenu.c | |
parent | a7d0d21966728c34e6a048ae918bb75ddd1946e1 (diff) |
Remove an useless test
Diffstat (limited to 'smenu.c')
-rw-r--r-- | smenu.c | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -4030,12 +4030,17 @@ select_ending_matches(win_t * win, term_t * term, search_data_t * search_data, ptr = str + strlen(str); nb = 0; - while ((ptr = utf8_prev(str, ptr)) != NULL && isblank(*ptr)) + while ((ptr = utf8_prev(str, ptr)) && isblank(*ptr)) if (ptr - str > 0) nb++; else break; + /* NOTE: utf8_prev cannot return NULL in the previous loop */ + /* because str always contains at least one UTF-8 valid */ + /* sequence, so does ptr. */ + /* """"""""""""""""""""""""""""""""""""""""""""""""""""""" */ + /* Check the bit corresponding to the last non blank glyph */ /* If set we add the index to an alternate array, if not we */ /* clear the bitmap of the corresponding word. */ @@ -11121,17 +11126,17 @@ main(int argc, char * argv[]) /* the cleanup of the first level of the tst_search_list. */ /* """""""""""""""""""""""""""""""""""""""""""""""""""""""" */ if (search_mode != PREFIX) - { - sub_tst_t * sub_tst_data; - ll_node_t * node; + { + sub_tst_t * sub_tst_data; + ll_node_t * node; - node = tst_search_list->tail; - sub_tst_data = (sub_tst_t *)(node->data); + node = tst_search_list->tail; + sub_tst_data = (sub_tst_t *)(node->data); - search_data.fuzzy_err = 0; + search_data.fuzzy_err = 0; - sub_tst_data->count = 0; - } + sub_tst_data->count = 0; + } } } |