diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-05-13 17:20:01 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-05-13 17:20:01 -0400 |
commit | 13b2945a3c3de7c309ca2e44ab4cf76236ff1fdb (patch) | |
tree | 40335f19a6bed76ff5e51544e75ae37ecfde5992 /src/regex | |
parent | e9cddc8e32b34f17c84d02fb52c11dfa4a3927f7 (diff) | |
download | musl-13b2945a3c3de7c309ca2e44ab4cf76236ff1fdb.tar.gz musl-13b2945a3c3de7c309ca2e44ab4cf76236ff1fdb.tar.xz musl-13b2945a3c3de7c309ca2e44ab4cf76236ff1fdb.zip |
remove some no-op end of string tests from regex parser
these are cruft from the original code which used an explicit string length rather than null termination. i blindly converted all the checks to null terminator checks, without noticing that in several cases, the subsequent switch statement would automatically handle the null byte correctly.
Diffstat (limited to 'src/regex')
-rw-r--r-- | src/regex/regcomp.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c index 712ca80d..322a5e67 100644 --- a/src/regex/regcomp.c +++ b/src/regex/regcomp.c @@ -1052,8 +1052,6 @@ tre_parse(tre_parse_ctx_t *ctx) } case PARSE_UNION: - if (!*ctx->re) - break; switch (*ctx->re) { case CHAR_PIPE: @@ -1086,8 +1084,6 @@ tre_parse(tre_parse_ctx_t *ctx) case PARSE_POSTFIX: /* Parse postfix operators. */ - if (!*ctx->re) - break; switch (*ctx->re) { case CHAR_PLUS: |