Skip to content

Commit 122dea7

Browse files
zeertzjqbrammool
authored andcommitted
patch 9.0.0095: conditions are always true
Problem: Conditions are always true. Solution: Remove useless conditions. (closes #10802)
1 parent 3d6ee8b commit 122dea7

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/buffer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4297,7 +4297,7 @@ build_stl_str_hl(
42974297
curitem = 0;
42984298
prevchar_isflag = TRUE;
42994299
prevchar_isitem = FALSE;
4300-
for (s = usefmt; *s; )
4300+
for (s = usefmt; *s != NUL; )
43014301
{
43024302
if (curitem == (int)stl_items_len)
43034303
{
@@ -4327,7 +4327,7 @@ build_stl_str_hl(
43274327
stl_items_len = new_len;
43284328
}
43294329

4330-
if (*s != NUL && *s != '%')
4330+
if (*s != '%')
43314331
prevchar_isflag = prevchar_isitem = FALSE;
43324332

43334333
/*

src/cindent.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2267,7 +2267,8 @@ get_c_indent(void)
22672267
}
22682268
// If the start comment string doesn't match with the
22692269
// start of the comment, skip this entry. XXX
2270-
else if (STRNCMP(ml_get(comment_pos->lnum) + comment_pos->col,
2270+
else if (STRNCMP(ml_get(comment_pos->lnum)
2271+
+ comment_pos->col,
22712272
lead_start, lead_start_len) != 0)
22722273
continue;
22732274
}
@@ -3717,7 +3718,7 @@ get_c_indent(void)
37173718
// Are we at the start of a cpp base class declaration or
37183719
// constructor initialization? XXX
37193720
n = FALSE;
3720-
if (curbuf->b_ind_cpp_baseclass != 0 && theline[0] != '{')
3721+
if (curbuf->b_ind_cpp_baseclass != 0)
37213722
{
37223723
n = cin_is_cpp_baseclass(&cache_cpp_baseclass);
37233724
l = ml_get_curline();

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,8 @@ static char *(features[]) =
735735

736736
static int included_patches[] =
737737
{ /* Add new patch number below this line */
738+
/**/
739+
95,
738740
/**/
739741
94,
740742
/**/

0 commit comments

Comments
 (0)