summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-27 15:48:45 +0100
committerBram Moolenaar <Bram@vim.org>2022-07-27 15:48:45 +0100
commit122dea70073d140aa89212d344c3f62bd3b5b3fa (patch)
tree8e9c9e34aa381f6da2dc7b8dcd58de85c19cedca
parent3d6ee8bda0550a01346f5992bbce09c0eb6d7569 (diff)
downloadvim-git-122dea70073d140aa89212d344c3f62bd3b5b3fa.tar.gz
patch 9.0.0095: conditions are always truev9.0.0095
Problem: Conditions are always true. Solution: Remove useless conditions. (closes #10802)
-rw-r--r--src/buffer.c4
-rw-r--r--src/cindent.c5
-rw-r--r--src/version.c2
3 files changed, 7 insertions, 4 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 436c0e951..108d59676 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -4297,7 +4297,7 @@ build_stl_str_hl(
curitem = 0;
prevchar_isflag = TRUE;
prevchar_isitem = FALSE;
- for (s = usefmt; *s; )
+ for (s = usefmt; *s != NUL; )
{
if (curitem == (int)stl_items_len)
{
@@ -4327,7 +4327,7 @@ build_stl_str_hl(
stl_items_len = new_len;
}
- if (*s != NUL && *s != '%')
+ if (*s != '%')
prevchar_isflag = prevchar_isitem = FALSE;
/*
diff --git a/src/cindent.c b/src/cindent.c
index 48ddca532..15b459cd6 100644
--- a/src/cindent.c
+++ b/src/cindent.c
@@ -2267,7 +2267,8 @@ get_c_indent(void)
}
// If the start comment string doesn't match with the
// start of the comment, skip this entry. XXX
- else if (STRNCMP(ml_get(comment_pos->lnum) + comment_pos->col,
+ else if (STRNCMP(ml_get(comment_pos->lnum)
+ + comment_pos->col,
lead_start, lead_start_len) != 0)
continue;
}
@@ -3717,7 +3718,7 @@ term_again:
// Are we at the start of a cpp base class declaration or
// constructor initialization? XXX
n = FALSE;
- if (curbuf->b_ind_cpp_baseclass != 0 && theline[0] != '{')
+ if (curbuf->b_ind_cpp_baseclass != 0)
{
n = cin_is_cpp_baseclass(&cache_cpp_baseclass);
l = ml_get_curline();
diff --git a/src/version.c b/src/version.c
index 8232111fe..064d566ad 100644
--- a/src/version.c
+++ b/src/version.c
@@ -736,6 +736,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 95,
+/**/
94,
/**/
93,