summaryrefslogtreecommitdiff
path: root/src/fold.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-03-17 16:45:12 +0100
committerBram Moolenaar <Bram@vim.org>2010-03-17 16:45:12 +0100
commit08bb82e8c59a5b8c470aad02d3fc15e18254a049 (patch)
treedd476680fef02542b289a9ca83d268a2fd3cac66 /src/fold.c
parent9c27fc3dba402773b9c5ef25a229f962e90f0eeb (diff)
downloadvim-08bb82e8c59a5b8c470aad02d3fc15e18254a049.zip
updated for version 7.2.397
Problem: Redundant check for w_lines_valid. Solution: Remove the if. (Lech Lorens)
Diffstat (limited to 'src/fold.c')
-rw-r--r--src/fold.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/fold.c b/src/fold.c
index a23a35c2a..c88e8f793 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -1053,15 +1053,14 @@ find_wl_entry(win, lnum)
{
int i;
- if (win->w_lines_valid > 0)
- for (i = 0; i < win->w_lines_valid; ++i)
- if (win->w_lines[i].wl_valid)
- {
- if (lnum < win->w_lines[i].wl_lnum)
- return -1;
- if (lnum <= win->w_lines[i].wl_lastlnum)
- return i;
- }
+ for (i = 0; i < win->w_lines_valid; ++i)
+ if (win->w_lines[i].wl_valid)
+ {
+ if (lnum < win->w_lines[i].wl_lnum)
+ return -1;
+ if (lnum <= win->w_lines[i].wl_lastlnum)
+ return i;
+ }
return -1;
}