]> granicus.if.org Git - apache/commitdiff
Wasted at least 20 minutes reparsing this code till I determined it's
authorWilliam A. Rowe Jr <wrowe@apache.org>
Sat, 13 Apr 2002 19:52:59 +0000 (19:52 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Sat, 13 Apr 2002 19:52:59 +0000 (19:52 +0000)
  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

index 0dcf7f3ff69a951d88df7744350cb013910255f0..b0fd03600f9052dbb9d291901c93810866b16eb9 100644 (file)
@@ -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;