diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-02-26 20:33:23 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-02-26 20:33:23 +0000 |
commit | 266c1f50df28885289fdd5a8a2dddb6c65efc125 (patch) | |
tree | 0e390f6a89990a9af0c293b0fd74585646c0603a /posix | |
parent | 3b3ddb4f7db98ec9e912ccdf54d35df4aa30e04a (diff) | |
download | glibc-266c1f50df28885289fdd5a8a2dddb6c65efc125.zip glibc-266c1f50df28885289fdd5a8a2dddb6c65efc125.tar.gz glibc-266c1f50df28885289fdd5a8a2dddb6c65efc125.tar.bz2 |
Update.
2004-02-26 Ulrich Drepper <drepper@redhat.com>
* posix/regcomp.c (parse_expression): Avoid duplication in calls
to build_charclass_op.
* posix/regcomp.c (parse_expression): Add cast to (const unsigned
char *) in calls to `build_charclass_op'.
Diffstat (limited to 'posix')
-rw-r--r-- | posix/regcomp.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/posix/regcomp.c b/posix/regcomp.c index 96b63a4..eccb93e 100644 --- a/posix/regcomp.c +++ b/posix/regcomp.c @@ -2239,22 +2239,20 @@ parse_expression (regexp, preg, token, syntax, nest, err) dfa->has_mb_node = 1; break; case OP_WORD: - tree = build_charclass_op (dfa, regexp->trans, "alnum", "_", 0, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; - break; case OP_NOTWORD: - tree = build_charclass_op (dfa, regexp->trans, "alnum", "_", 1, err); + tree = build_charclass_op (dfa, regexp->trans, + (const unsigned char *) "alnum", + (const unsigned char *) "_", + token->type == OP_NOTWORD, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; case OP_SPACE: - tree = build_charclass_op (dfa, regexp->trans, "space", "", 0, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; - break; case OP_NOTSPACE: - tree = build_charclass_op (dfa, regexp->trans, "space", "", 1, err); + tree = build_charclass_op (dfa, regexp->trans, + (const unsigned char *) "space", + (const unsigned char *) "", + token->type == OP_NOTSPACE, err); if (BE (*err != REG_NOERROR && tree == NULL, 0)) return NULL; break; |