summaryrefslogtreecommitdiffstats
path: root/smenu.c
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2021-10-18 13:47:58 +0200
committerpgen <p.gen.progs@gmail.com>2021-10-18 13:47:58 +0200
commit0ce076bbfcd96913ab5add1b5a0b2ff13d68462a (patch)
tree8e843aed006776ddf9671e336b0effb2cd6ac763 /smenu.c
parenta7d0d21966728c34e6a048ae918bb75ddd1946e1 (diff)
Remove an useless test
Diffstat (limited to 'smenu.c')
-rw-r--r--smenu.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/smenu.c b/smenu.c
index 1e2a238..7a2439a 100644
--- a/smenu.c
+++ b/smenu.c
@@ -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;
+ }
}
}