aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2017-04-09 10:08:26 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2017-04-10 12:02:26 +0200
commitc1cf03398143f4dc0ac9155988edad349d24deca (patch)
treeab3992856251b9adb86f44611f0c9c36926b8e0d /src/nvim/regexp.c
parentacc06b0b7b99925d7567d2e79c2f5e88434edae8 (diff)
downloadrneovim-c1cf03398143f4dc0ac9155988edad349d24deca.tar.gz
rneovim-c1cf03398143f4dc0ac9155988edad349d24deca.tar.bz2
rneovim-c1cf03398143f4dc0ac9155988edad349d24deca.zip
lint: fix clint errors around mb_tolower calls
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r--src/nvim/regexp.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c
index 7e2fc261f2..4b5e17b00b 100644
--- a/src/nvim/regexp.c
+++ b/src/nvim/regexp.c
@@ -4573,12 +4573,14 @@ regmatch (
if (OP(next) == EXACTLY) {
rst.nextb = *OPERAND(next);
if (ireg_ic) {
- if (mb_isupper(rst.nextb))
+ if (mb_isupper(rst.nextb)) {
rst.nextb_ic = mb_tolower(rst.nextb);
- else
+ } else {
rst.nextb_ic = mb_toupper(rst.nextb);
- } else
+ }
+ } else {
rst.nextb_ic = rst.nextb;
+ }
} else {
rst.nextb = NUL;
rst.nextb_ic = NUL;
@@ -6312,14 +6314,15 @@ static char_u *cstrchr(char_u *s, int c)
/* tolower() and toupper() can be slow, comparing twice should be a lot
* faster (esp. when using MS Visual C++!).
* For UTF-8 need to use folded case. */
- if (enc_utf8 && c > 0x80)
+ if (c > 0x80) {
cc = utf_fold(c);
- else if (mb_isupper(c))
+ } else if (mb_isupper(c)) {
cc = mb_tolower(c);
- else if (mb_islower(c))
+ } else if (mb_islower(c)) {
cc = mb_toupper(c);
- else
+ } else {
return vim_strchr(s, c);
+ }
if (has_mbyte) {
for (p = s; *p != NUL; p += (*mb_ptr2len)(p)) {