summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/libregexp/regexec.c5
-rw-r--r--sys/src/libregexp/rregexec.c5
2 files changed, 2 insertions, 8 deletions
diff --git a/sys/src/libregexp/regexec.c b/sys/src/libregexp/regexec.c
index 89501de6a..9fa9a1229 100644
--- a/sys/src/libregexp/regexec.c
+++ b/sys/src/libregexp/regexec.c
@@ -69,7 +69,6 @@ Again:
if(r != curinst->r)
goto Done;
case OANY: /* fallthrough */
- Any:
next = t->next;
t->pc = curinst + 1;
t->next = nil;
@@ -111,12 +110,10 @@ Again:
}
goto Done;
case OEOL:
- if(r == L'\0' && ep == nil) {
+ if(r == L'\n' || r == L'\0' && ep == nil) {
curinst++;
goto Again;
}
- if(r == L'\n')
- goto Any;
goto Done;
case OJMP:
curinst = curinst->a;
diff --git a/sys/src/libregexp/rregexec.c b/sys/src/libregexp/rregexec.c
index 557580b9c..b1320de4b 100644
--- a/sys/src/libregexp/rregexec.c
+++ b/sys/src/libregexp/rregexec.c
@@ -68,7 +68,6 @@ Again:
if(*rsp != curinst->r)
goto Done;
case OANY: /* fallthrough */
- Any:
next = t->next;
t->pc = curinst + 1;
t->next = nil;
@@ -110,12 +109,10 @@ Again:
}
goto Done;
case OEOL:
- if(*rsp == L'\0' && rep == nil) {
+ if(*rsp == '\n' || *rsp == L'\0' && rep == nil) {
curinst++;
goto Again;
}
- if(*rsp == '\n')
- goto Any;
goto Done;
case OJMP:
curinst = curinst->a;