summaryrefslogtreecommitdiffstats
path: root/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/regex.c b/regex.c
index fee25ad..3a14b25 100644
--- a/regex.c
+++ b/regex.c
@@ -152,9 +152,7 @@ bool bfs_regexec(struct bfs_regex *regex, const char *str, enum bfs_regexec_flag
int eflags = 0;
#ifdef REG_STARTEND
- if (flags & BFS_REGEX_ANCHOR) {
- eflags |= REG_STARTEND;
- }
+ eflags |= REG_STARTEND;
#endif
int ret = regexec(&regex->impl, str, 1, &match, eflags);
@@ -167,11 +165,11 @@ bool bfs_regexec(struct bfs_regex *regex, const char *str, enum bfs_regexec_flag
}
} else if (ret == REG_NOMATCH) {
*err = 0;
- return false;
} else {
*err = ret;
- return false;
}
+
+ return false;
#endif
}