diff options
author | ZyX <kp-pav@yandex.ru> | 2016-05-01 20:35:51 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2016-05-01 20:35:51 +0300 |
commit | cf4e1fb0f4962319eee292248d9c1f73be3a8d0c (patch) | |
tree | 60b1d2aad6205c74b7c2611fbbed45759a302f4f /src/nvim/regexp.c | |
parent | a1f985f60a228604970a70872b7ea1fb5299eba3 (diff) | |
download | rneovim-cf4e1fb0f4962319eee292248d9c1f73be3a8d0c.tar.gz rneovim-cf4e1fb0f4962319eee292248d9c1f73be3a8d0c.tar.bz2 rneovim-cf4e1fb0f4962319eee292248d9c1f73be3a8d0c.zip |
*: Fix new linter errors
Originally there were 128 new errors, so I thought this is a good idea to fix
all of them. Of course, this commit also fixes many suppressed errors.
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r-- | src/nvim/regexp.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index 608aa38466..886a48e7c5 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -3445,13 +3445,14 @@ static long bt_regexec_both(char_u *line, c = regline[col]; if (prog->regstart == NUL || prog->regstart == c - || (ireg_ic && (( - (enc_utf8 && utf_fold(prog->regstart) == utf_fold(c))) - || (c < 255 && prog->regstart < 255 && - vim_tolower(prog->regstart) == vim_tolower(c))))) + || (ireg_ic + && (((enc_utf8 && utf_fold(prog->regstart) == utf_fold(c))) + || (c < 255 && prog->regstart < 255 + && vim_tolower(prog->regstart) == vim_tolower(c))))) { retval = regtry(prog, col); - else + } else { retval = 0; + } } else { int tm_count = 0; /* Messy cases: unanchored match. */ @@ -4121,15 +4122,15 @@ regmatch ( char_u *opnd; opnd = OPERAND(scan); - /* Inline the first byte, for speed. */ + // Inline the first byte, for speed. if (*opnd != *reginput - && (!ireg_ic || ( - !enc_utf8 && - vim_tolower(*opnd) != vim_tolower(*reginput)))) + && (!ireg_ic + || (!enc_utf8 + && vim_tolower(*opnd) != vim_tolower(*reginput)))) { status = RA_NOMATCH; - else if (*opnd == NUL) { - /* match empty string always works; happens when "~" is - * empty. */ + } else if (*opnd == NUL) { + // match empty string always works; happens when "~" is + // empty. } else { if (opnd[1] == NUL && !(enc_utf8 && ireg_ic)) { len = 1; /* matched a single byte above */ |