From 28074eb721dd7345b55bad147f1e1f6aba46e84a Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Sat, 13 Apr 2002 19:52:59 +0000 Subject: [PATCH] Wasted at least 20 minutes reparsing this code till I determined it's correct. But make the sucker legible so noone else repeats the experience. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94635 13f79535-47bb-0310-9956-ffa450edef68 --- modules/generators/mod_cgi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index 0dcf7f3ff6..b0fd03600f 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -515,11 +515,11 @@ static apr_status_t default_build_command(const char **cmd, const char ***argv, int numwords, x, idx; char *w; const char *args = r->args; - const char *argv0; if (replace_cmd) { /* Allow suexec's "/" check to succeed */ - if ((argv0 = strrchr(r->filename, '/')) != NULL) + const char *argv0 = strrchr(r->filename, '/'); + if (argv0 != NULL) argv0++; else argv0 = r->filename; -- 2.50.1