From: Joe Orton Date: Mon, 16 Oct 2017 16:40:52 +0000 (+0000) Subject: * server/util_expr_eval.c (ap_expr_eval_re_backref): Fix gcc 7.x warning. X-Git-Tag: 2.5.0-alpha~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9246096892038638fb77d36ddd0227c3b31cdd62;p=apache * 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' || git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1812307 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/util_expr_eval.c b/server/util_expr_eval.c index ab36dbd0a9..9220acb749 100644 --- a/server/util_expr_eval.c +++ b/server/util_expr_eval.c @@ -262,8 +262,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;