summaryrefslogtreecommitdiff
path: root/src/regexp_nfa.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-07-13 20:58:11 +0200
committerBram Moolenaar <Bram@vim.org>2013-07-13 20:58:11 +0200
commit690ae9c85854433d9b3d4ce76eb5d99340c56b2a (patch)
treecc7068532bdd4d0b5f42f5ac91643c102fcda79c /src/regexp_nfa.c
parent2b79bfdeabbbe8f6e5378290c72c770f84796c08 (diff)
downloadvim-git-690ae9c85854433d9b3d4ce76eb5d99340c56b2a.tar.gz
updated for version 7.4a.018v7.4a.018
Problem: Compiler warning for code unreachable. (Charles Campbell) Solution: Use "while" instead of endless loop. Change break to continue.
Diffstat (limited to 'src/regexp_nfa.c')
-rw-r--r--src/regexp_nfa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index d8df13cb0..b16ba56ea 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -3739,7 +3739,7 @@ match_follows(startstate, depth)
if (depth > 10)
return FALSE;
- for (;;)
+ while (state != NULL)
{
switch (state->c)
{
@@ -3765,7 +3765,7 @@ match_follows(startstate, depth)
case NFA_COMPOSING:
/* skip ahead to next state */
state = state->out1->out;
- break;
+ continue;
case NFA_ANY:
case NFA_IDENT: