You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2017/10/16 16:40:52 UTC

svn commit: r1812307 - /httpd/httpd/trunk/server/util_expr_eval.c

Author: jorton
Date: Mon Oct 16 16:40:52 2017
New Revision: 1812307

URL: http://svn.apache.org/viewvc?rev=1812307&view=rev
Log:
* 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' ||

Modified:
    httpd/httpd/trunk/server/util_expr_eval.c

Modified: httpd/httpd/trunk/server/util_expr_eval.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_expr_eval.c?rev=1812307&r1=1812306&r2=1812307&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_expr_eval.c (original)
+++ httpd/httpd/trunk/server/util_expr_eval.c Mon Oct 16 16:40:52 2017
@@ -262,8 +262,8 @@ static const char *ap_expr_eval_re_backr
 {
     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;