Commit c2117288 authored by Joe Orton's avatar Joe Orton
Browse files

Merge r1812307 from trunk:

* server/util_expr_eval.c (ap_expr_eval_re_backref): Fix gcc 7.x warning.

util_expr_eval.c: In function ‘ap_expr_eval_re_backref’:
util_expr_eval.c:265:63: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
     if (!ctx->re_pmatch || !ctx->re_source || *ctx->re_source == '\0' ||

Reviewed by: rjung, ylavic, jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1812367 13f79535-47bb-0310-9956-ffa450edef68
parent 7baa4a4a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -189,8 +189,8 @@ static const char *ap_expr_eval_re_backref(ap_expr_eval_ctx_t *ctx, unsigned int
{
    int len;

    if (!ctx->re_pmatch || !ctx->re_source || *ctx->re_source == '\0' ||
        ctx->re_nmatch < n + 1)
    if (!ctx->re_pmatch || !ctx->re_source || !*ctx->re_source
        || **ctx->re_source == '\0' || ctx->re_nmatch < n + 1)
        return "";

    len = ctx->re_pmatch[n].rm_eo - ctx->re_pmatch[n].rm_so;