summaryrefslogtreecommitdiffstats
path: root/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/regex.c b/regex.c
index 7412b2d6..3943d93a 100644
--- a/regex.c
+++ b/regex.c
@@ -1945,11 +1945,8 @@ static val reg_optimize(val exp)
if (arg1 == t || arg2 == t)
return t;
- if (reg_matches_all(arg1)) {
- if (reg_matches_all(arg2))
- return cons(zeroplus_s, cons(wild_s, nil));
+ if (reg_matches_all(arg1))
return arg2;
- }
if (reg_matches_all(arg2))
return arg2;